Endpoint
POST /v1/
Extract structured data from documents and images using AI-powered parsing.
Request Body
Section titled “Request Body”| Parameter | Type | Required | Description |
|---|---|---|---|
schema | object | Yes | JSON schema defining the data structure to extract |
contents | array | Yes | Array of files to process |
Contents Array
Section titled “Contents Array”Each item in the contents array must contain:
| Field | Type | Required | Description |
|---|---|---|---|
filename | string | No | Optional filename |
mimeType | string | Yes | MIME type of the file |
data | string | Yes | Base64-encoded file data |
Supported MIME Types
Section titled “Supported MIME Types”image/jpeg- JPEG imagesimage/png- PNG imagesimage/webp- WebP imagesimage/gif- GIF imagesapplication/pdf- PDF documents
Request Example
Section titled “Request Example”{ "schema": { "type": "object", "properties": { "invoice_number": { "type": "string", "description": "Unique invoice identifier, often prefixed with 'INV-' or similar" }, "total_amount": { "type": "number", "description": "Final amount due including all taxes and fees" }, "date": { "type": "string", "description": "Invoice date in YYYY-MM-DD format" } } }, "contents": [ { "filename": "receipt.pdf", "mimeType": "application/pdf", "data": "JVBERi0xLjQKJcOkw7zDtsO..." } ]}Response
Section titled “Response”Returns extracted data as JSON matching your provided schema:
{ "invoice_number": "INV-2024-001", "total_amount": 1250.5, "date": "2024-01-15"}Error Responses
Section titled “Error Responses”| Status Code | Description |
|---|---|
400 | Bad Request - Invalid request format |
401 | Unauthorized - Invalid or missing API key |
500 | Internal Server Error - Server processing error |