Responses and errors
Successful response
{
"data": {
"document": {
"text": "Extracted document text...",
"pages": [{ "number": 1, "text": "Page one text..." }],
"metadata": { "mime_type": "application/pdf", "page_count": 1 }
}
},
"request_id": "req_example"
}
| data.document.text | Combined extracted text. |
|---|
| data.document.pages | Per-page text with one-based page number. |
|---|
| data.document.metadata.mime_type | Accepted source MIME type. |
|---|
| data.document.metadata.page_count | Processed page count. |
|---|
| request_id | Safe correlation ID for support and troubleshooting. |
|---|
Error envelope
{
"error": { "code": "invalid_api_key", "message": "The API credential is invalid." },
"request_id": "req_example"
}
| 400 | invalid_request — fix multipart body, file field, or request shape. |
|---|
| 401 | invalid_api_key — check key validity and environment. |
|---|
| 403 | insufficient_access — request or renew the required capability grant. |
|---|
| 413 | file_too_large — reduce the upload below 10 MiB. |
|---|
| 415 | unsupported_media_type — use PDF, JPEG, or PNG with matching content. |
|---|
| 422 | invalid_document — use an unencrypted PDF, permitted image dimensions, and valid document. |
|---|
| 429 | rate_limit_exceeded or quota_exceeded — respect Retry-After when included. |
|---|
| 5xx | runtime_unavailable or processing failure — retain request_id and retry safely where appropriate. |
|---|
Error codes are stable where shown by the runtime; provider internals are intentionally not exposed.