Upload any document. Get structured JSON back. Invoices, contracts, tax forms, leases, receipts — extracted in seconds with AI-powered precision.
Get Your Free API KeyThe StellarClose Document Intelligence API extracts structured data from documents using AI. Upload a PDF or image, and receive clean, typed JSON with extracted fields, confidence scores, key dates, and financial summaries.
/api/v1/extract endpointcurl -X POST https://api.stellarclose.com/api/v1/extract \ -H "X-Api-Key: YOUR_API_KEY" \ -F "file=@invoice.pdf"
import requests
resp = requests.post(
"https://api.stellarclose.com/api/v1/extract",
headers={"X-Api-Key": "YOUR_API_KEY"},
files={"file": open("invoice.pdf", "rb")}
)
data = resp.json()
print(data["data"]["document_type"])
print(data["data"]["extracted_fields"])
const form = new FormData();
form.append("file", fs.createReadStream("invoice.pdf"));
const res = await fetch("https://api.stellarclose.com/api/v1/extract", {
method: "POST",
headers: { "X-Api-Key": "YOUR_API_KEY" },
body: form,
});
const data = await res.json();
console.log(data.data.document_type);
console.log(data.data.extracted_fields);
All API requests require an API key passed in the X-Api-Key header.
X-Api-Key: doci_your_api_key_here
API keys start with the doci_ prefix. Keep your key secure — do not commit it to version control or expose it in client-side code.
Sign up via the form below or call the signup endpoint:
curl -X POST https://api.stellarclose.com/api/v1/signup \
-H "Content-Type: application/json" \
-d '{"email": "you@example.com"}'
| Status | Meaning |
|---|---|
401 | Missing or invalid API key |
429 | Monthly page limit exceeded (free tier) |
413 | File too large or too many pages for tier |
Base URL: https://api.stellarclose.com
Multipart form upload. Send the document as the file field.
| Field | Type | Description |
|---|---|---|
file | File (required) | PDF, PNG, JPG, GIF, WEBP, TIFF, or BMP. Max 50MB. |
| Header | Required | Description |
|---|---|---|
X-Api-Key | Yes | Your API key |
{
"success": true,
"data": {
"document_type": "Commercial Invoice",
"document_summary": "Invoice #INV-2024-0847 from Acme Corp to Beta LLC for consulting services totaling $12,500.00",
"extracted_fields": {
"invoice_number": "INV-2024-0847",
"invoice_date": "2024-03-15",
"due_date": "2024-04-14",
"vendor_name": "Acme Corporation",
"vendor_address": "123 Business Ave, Suite 400, New York, NY 10001",
"bill_to": "Beta LLC",
"subtotal": 12500.00,
"tax_rate": "0%",
"tax_amount": 0,
"total": 12500.00,
"payment_terms": "Net 30"
},
"confidence_scores": {
"invoice_number": 0.99,
"invoice_date": 0.98,
"due_date": 0.95,
"vendor_name": 0.99,
"total": 0.99
},
"key_dates": [
{"date": "2024-03-15", "description": "Invoice date", "is_deadline": false},
{"date": "2024-04-14", "description": "Payment due date", "is_deadline": true}
],
"parties": [
{"name": "Acme Corporation", "role": "vendor", "contact": "billing@acme.com"},
{"name": "Beta LLC", "role": "client", "contact": null}
],
"financial_summary": {
"total_amount": 12500.00,
"currency": "USD",
"line_items": [
{"description": "Strategy consulting — March 2024", "quantity": 50, "unit_price": 250.00, "amount": 12500.00}
]
},
"metadata": {
"page_count": 1,
"language": "en",
"has_signatures": false,
"is_executed": true
}
},
"usage": {
"pages_processed": 1,
"processing_time_ms": 2340,
"tokens_used": 1856,
"monthly_pages_used": 12,
"monthly_pages_limit": 50
}
}
The API automatically detects and extracts from any document type including:
| Category | Examples |
|---|---|
| Financial | Invoices, receipts, bank statements, purchase orders |
| Tax | W-2, 1099, W-9, tax returns |
| Legal | Contracts, NDAs, lease agreements, terms of service |
| Real Estate | Purchase agreements, disclosures, title commitments, closing docs |
| Insurance | Policies, claims, EOBs |
| Medical | Medical records, lab results, prescriptions |
| Identity | Driver licenses, passports (image upload) |
| Other | Resumes, reports, forms — any structured document |
{"email": "developer@example.com"}
{
"success": true,
"message": "Account created. Your API key is below.",
"api_key": "doci_a1b2c3d4e5f6...",
"tier": "free",
"limits": {"pages_month": 50, "pages_request": 5, "price": 0},
"docs": "https://api.stellarclose.com/docs"
}
X-Api-Key | Required |
{
"email": "developer@example.com",
"tier": "free",
"monthly_usage": {
"pages_used": 23,
"pages_limit": 50,
"pages_remaining": 27,
"overage_pages": 0,
"overage_charge": 0,
"reset_date": "2024-04-01"
},
"tier_limits": {
"pages_per_month": 50,
"pages_per_request": 5,
"price_per_month": 0
}
}
{"status": "healthy", "service": "stellarclose-document-intelligence", "version": "1.0.0"}
import requests
API_KEY = "doci_your_key_here"
BASE = "https://api.stellarclose.com"
# Upload a PDF invoice
with open("invoice.pdf", "rb") as f:
resp = requests.post(
f"{BASE}/api/v1/extract",
headers={"X-Api-Key": API_KEY},
files={"file": ("invoice.pdf", f, "application/pdf")}
)
result = resp.json()
if result["success"]:
doc = result["data"]
print(f"Type: {doc['document_type']}")
print(f"Summary: {doc['document_summary']}")
# Access extracted fields
fields = doc["extracted_fields"]
print(f"Invoice #: {fields.get('invoice_number')}")
print(f"Total: ${fields.get('total')}")
# Check deadlines
for d in doc.get("key_dates", []):
if d["is_deadline"]:
print(f"DEADLINE: {d['date']} — {d['description']}")
else:
print(f"Error: {resp.status_code}")
const fs = require("fs");
const FormData = require("form-data");
const API_KEY = "doci_your_key_here";
const BASE = "https://api.stellarclose.com";
async function extractDocument(filePath) {
const form = new FormData();
form.append("file", fs.createReadStream(filePath));
const res = await fetch(`${BASE}/api/v1/extract`, {
method: "POST",
headers: {
"X-Api-Key": API_KEY,
...form.getHeaders(),
},
body: form,
});
return res.json();
}
// Process multiple files
const files = ["invoice1.pdf", "contract.pdf", "receipt.jpg"];
for (const file of files) {
const result = await extractDocument(file);
console.log(`${file}: ${result.data.document_type}`);
console.log(` Fields: ${Object.keys(result.data.extracted_fields).length}`);
}
# Extract from a photo of a receipt curl -X POST https://api.stellarclose.com/api/v1/extract \ -H "X-Api-Key: doci_your_key_here" \ -F "file=@receipt.jpg" # Check your usage curl https://api.stellarclose.com/api/v1/usage \ -H "X-Api-Key: doci_your_key_here"
Start free. Scale as you grow. All tiers include the same AI extraction quality.
| Tier | Pages/Month | Pages/Request | Overage |
|---|---|---|---|
| Free | 50 | 5 | Hard cap (upgrade required) |
| Starter | 500 | 20 | $0.05/page |
| Growth | 2,000 | 50 | $0.05/page |
| Scale | 10,000 | 100 | $0.05/page |
Need more? Contact support@stellarclose.com for enterprise pricing.
No credit card required. Instant API key.