Every error has the same JSON body:
json
{
"error_id": "err_262f371ad0",
"code": "invalid_request",
"message": "document_id: Field required"
}
Branch on code; it is stable. message is for people and may change.
Include error_id when you contact support.
429 responses have a Retry-After header in seconds.
Status Retry? 400, 401, 403, 404, 409, 413, 415, 422No. Fix the request first. 402After adding credit. 429Yes, after Retry-After seconds. 500, 502, 503, 504Yes, with exponential backoff. Use an Idempotency-Key when creating extractions.
Code Status Meaning unauthorized401 The key is missing, wrong or revoked. Send Authorization: Bearer <key>. insufficient_scope403 The key lacks the scope this call needs. mode_mismatch403 A test key asked for live data or the other way around. insufficient_credits402 The balance is used up; live extractions and suggestions are blocked.
Code Status Meaning invalid_request400, 422 A parameter or body field is missing or invalid; message names it. invalid_metadata400 metadata breaks a limit (20 keys, 40-character keys, 500-character string values) or test_outcome is unknown.invalid_cursor400 The cursor is not one returned by this list. idempotency_conflict409 The Idempotency-Key was used for a different request. not_found404 No such endpoint. method_not_allowed405 The endpoint does not support this HTTP method.
Code Status Meaning rate_limited429 Too many requests per minute for this key. Wait Retry-After seconds. concurrency_limit429 Too many extractions are open at once. Wait for some to finish. key_limit_reached409 The account has the maximum number of API keys. Revoke one first. webhook_limit_reached409 The account has the maximum number of webhook endpoints.
Code Status Meaning upload_too_large413 The file is larger than the upload limit. unsupported_media_type415 The file type is not supported, or its content does not match its extension. See supported formats . malformed_document422 The file could not be read. encrypted_document422 The file is password protected. document_limit_exceeded422 The document has too many pages, sheets or cells. document_not_found404 No such document in this mode, or it was deleted. document_in_use409 A run on the document is still in progress; delete it when the run ends.
Code Status Meaning invalid_schema422 The JSON Schema breaks a rule ; message names it. schema_not_found404 No such schema. schema_version_not_found404 The schema has no such version. schema_conflict409 base_version is older than the latest version. Reload and try again.template_not_found404 No such template.
Code Status Meaning job_not_found404 No such extraction in this mode. job_not_completed409 The job has no result: it is still running (wait), or it failed or was cancelled (see last_error). result_requires_pagination413 The result is very large; use /result/manifest, /result/collections or /result/export. not_available_in_test_mode404 This route exists only for live jobs. test_mode_unsupported400 The feature (schema suggestions) needs a live key.
Code Status Meaning invalid_webhook_url400 Not an absolute URL, or a live URL that is not public https. invalid_webhook_events400 An unknown event type. webhook_not_found404 No such endpoint. webhook_delivery_not_found404 No such delivery. webhook_disabled409 Enable the endpoint before resending.
A job that fails after it started has status: "failed" and a readable last_error
instead of an HTTP error. Common causes are a model provider outage (retry later),
job_time_limit_exceeded or model input limits for very large documents (split the
document or narrow the schema).