Get your API key and make your first extraction in under a minute.
https://api.invoiceocr.aileapers.com/v1
All requests require an API key passed in the Authorization header.
Authorization: Bearer YOUR_API_KEY
Upload a single invoice document and receive structured data.
curl -X POST https://api.invoiceocr.aileapers.com/v1/extract \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "file=@invoice.pdf" \
-F "format=json"
import requests
url = "https://api.invoiceocr.aileapers.com/v1/extract"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
files = {"file": open("invoice.pdf", "rb")}
data = {"format": "json"}
response = requests.post(url, headers=headers, files=files, data=data)
result = response.json()
print(result)
| Parameter | Type | Required | Description |
|---|---|---|---|
| file | file | Yes | Invoice file (PDF, PNG, JPG). Max 20MB. |
| format | string | No | Response format: json (default), csv |
| language | string | No | ISO 639-1 code. Default: en. Auto-detected if omitted. |
| webhook_url | string | No | URL to POST results to when processing completes (Business plan). |
{
"id": "ext_a1b2c3d4",
"status": "completed",
"processing_time_ms": 1847,
"confidence": 0.97,
"vendor": {
"name": "Acme Supply Co.",
"address": "123 Industrial Blvd, Austin, TX 78701",
"tax_id": "XX-XXXXXXX"
},
"invoice_number": "INV-2026-0847",
"date": "2026-05-15",
"due_date": "2026-06-14",
"currency": "USD",
"line_items": [
{
"description": "Widget A - Premium Grade",
"quantity": 250,
"unit_price": 4.50,
"amount": 1125.00
}
],
"subtotal": 1125.00,
"tax": 92.81,
"tax_rate": 0.0825,
"total": 1217.81,
"payment_terms": "Net 30",
"pages_processed": 1
}
Upload multiple invoices in one request. Pro plan: up to 50 files. Business plan: up to 500 files.
curl -X POST https://api.invoiceocr.aileapers.com/v1/batch/extract \
-H "Authorization: Bearer YOUR_API_KEY" \
-F "files[]=@invoice1.pdf" \
-F "files[]=@invoice2.pdf" \
-F "files[]=@invoice3.jpg"
{
"batch_id": "bat_x7y8z9",
"status": "processing",
"total_files": 3,
"poll_url": "/v1/batch/bat_x7y8z9",
"estimated_completion_seconds": 12
}
Check the status of a batch extraction job. Returns all completed results when the batch is done.
{
"batch_id": "bat_x7y8z9",
"status": "completed",
"completed": 3,
"failed": 0,
"results": [
{ "filename": "invoice1.pdf", "status": "completed", "data": { /* ... */ } },
{ "filename": "invoice2.pdf", "status": "completed", "data": { /* ... */ } },
{ "filename": "invoice3.jpg", "status": "completed", "data": { /* ... */ } }
]
}
Check your current month's usage and remaining quota.
{
"plan": "pro",
"period": "2026-06",
"invoices_used": 127,
"invoices_limit": 500,
"invoices_remaining": 373
}
| Status | Code | Description |
|---|---|---|
| 400 | invalid_file | Unsupported file type or corrupt file |
| 401 | unauthorized | Missing or invalid API key |
| 413 | file_too_large | File exceeds 20MB limit |
| 429 | rate_limited | Monthly quota exceeded or too many concurrent requests |
| 500 | processing_error | Internal processing failure (retry with exponential backoff) |
{
"error": {
"code": "rate_limited",
"message": "Monthly quota exceeded. 500/500 invoices used.",
"upgrade_url": "https://ocr.aileapers.com/pricing.html"
}
}
10 requests/month
1 concurrent request
Single-page only
500 requests/month
5 concurrent requests
Multi-page PDF
5,000 requests/month
20 concurrent requests
Webhooks + batch
Get your free API key and start extracting invoice data in minutes.
Get your API key