Extract
Extract structured data from a document
Upload a file, provide a URL, or reference an existing document to extract structured data. The response is synchronous for small documents (<=5 pages) and asynchronous for larger ones, unless overridden via the options field.
Provide exactly one document source: file, file_url, or document_id.
Optionally supply a schema (inline JSON or schema_id) and/or free-text instructions to guide extraction.
post/v1/extract
Request
- Base URL: https://api.talonic.com
- URL: https://api.talonic.com/v1/extract
- Auth: HTTP bearer
Headers
Idempotency-Keystring
Unique key for idempotent requests, at most 64 characters (a longer key is refused with 400 invalid_idempotency_key before any work). If a request with the same key was already processed, the cached result is returned.
Response
Synchronous extraction completed.
Example response
{
"extraction_id": "d1a2b3c4-5678-9abc-def0-1234567890ab",
"request_id": "req_x7y8z9a0b1c2d3e4",
"status": "complete",
"document": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"filename": "invoice-042.pdf",
"pages": 3,
"size_bytes": 245760,
"type_detected": "Invoice",
"language_detected": "en"
},
"data": {
"invoice_number": "INV-2024-0042",
"total_amount": 1250,
"vendor_name": "Acme Corp"
},
"schema": {
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
},
"confidence": {
"overall": 0.92,
"fields": {
"invoice_number": 0.99,
"total_amount": 0.95,
"vendor_name": 0.82
}
},
"processing": {
"duration_ms": 3420,
"pages_processed": 3,
"region": "eu-west"
}
}Changes
No recorded changes to this operation across all 1 revision of this API.