Skip to content

Errors

Every error, from any endpoint, uses one envelope and a non-2xx status:

{
"error": {
"type": "invalid_request_error",
"code": "unsupported_type",
"message": "Legacy .doc/.xls/.ppt files are not supported yet. Save as .docx/.xlsx/.pptx or PDF.",
"doc_url": "https://docs.deskew.dev/errors#legacy_office_unsupported"
}
}
Field Meaning
type The family: authentication_error, permission_error, invalid_request_error, document_error, rate_limit_error, billing_error, processing_error, api_error
code Stable machine-readable code. Branch on this, never on message
message Human-readable explanation, may change
doc_url Link to the matching section on this page
param Present on validation_error and missing_file: the offending parameter

Some responses add headers: Retry-After on 429, Idempotent-Replayed on replays, and X-Request-Id on everything. Quote the request id when contacting support; it matches the row in Request logs.

A failed job carries the same {type, code, message} object in its error field, and in the data.error of a job.failed webhook.

No Authorization: Bearer … or X-Api-Key header. Send the key; see Authentication.

The key does not have a Deskew prefix or does not match any project. Check for truncation and whitespace; copy the key again from the dashboard.

The key was revoked in the dashboard. Create a new one.

The key passed its expiry date, or it is the old key of a roll and the 24-hour overlap is over. Switch to the new key.

The request came from an address outside the key’s IP allowlist. Add the address or CIDR under API keys → Restrict IPs, or call from an allowed host. Behind a proxy, make sure X-Forwarded-For carries the real client address.

The key lacks the scope the endpoint needs (the message names it). Create a key with the right scopes; scopes cannot be edited on an existing key.

The account’s email address has not been verified, so the dashboard action is blocked. Click the link in the verification email or request a new one from the banner. Dashboard only; the public API does not return this code.

More requests per minute than the plan allows for this key. Wait Retry-After seconds and retry with backoff. Limits are in Rate limits and quotas.

The test key has used its 50 pages for today (UTC), or this request alone would exceed it. Use another test key, wait for the next day, or use a live key.

On Free, the request would exceed the 1,000 included pages this cycle. On paid plans, it would push the projected bill over the organization’s spend cap. Upgrade, raise the cap under Usage and billing, or wait for the next cycle.

A parameter has the wrong type or value; param names it and message says what was expected. Typical causes: output not one of markdown|json|text, quality not one of auto|fast|accurate|premium, mode not one of auto|sync|async, a JSON body without url, or a schema body whose json_schema.type is not object.

POST /v1/extract received neither a multipart file nor a url. Send one of them.

The uploaded file (or the body fetched from url) has zero bytes.

The bytes are not a format Deskew reads (for example a ZIP archive or an unknown binary). Supported: PDF, DOCX, XLSX/XLSM, CSV/TSV, PPTX, PNG, JPEG, TIFF, WebP, BMP, GIF, HEIC/HEIF, EML, MSG, HTML, TXT. Status 415.

A binary .doc, .xls or .ppt file. Save it as .docx / .xlsx / .pptx or export to PDF. Status 415.

The upload or URL body is over 500 MB. Split the document. Status 413.

You sent mode=sync for a document that is not eligible for a synchronous run (more than 12 work units or over 20 MB). Drop mode or use mode=async and poll the job. Status 413.

url does not start with http:// or https://.

The URL could not be fetched: the server answered 4xx/5xx, timed out (30 s), redirected more than five times, or the connection failed. Make sure the file is publicly reachable or upload it directly.

These are type: "document_error". For a synchronous request they are the HTTP response; for a background job they appear in the job’s error.

The PDF is encrypted and no password, or the wrong one, was given. Send it as pdf_password (form field) or options.pdf_password (JSON).

The file could not be opened by its parser: a damaged PDF, an image that will not decode, a broken XLSX or PPTX. Re-export the file from its source application.

The PDF has no pages, or the workbook has no sheets.

The PDF has more than 2,000 pages. Split it.

No job with that id in this key’s project and mode. Check the id, and remember test keys cannot see live jobs and vice versa. Status 404.

The job is not completed yet (the message gives the current status). Poll GET /v1/jobs/:id until it is, or wait for the webhook. Status 409.

The job completed more than 24 hours ago and its result has been deleted. Submit the document again. Status 410.

The Idempotency-Key was already used within the last 24 hours with a different file or different options. Use a new key for a new request. Status 409. See Idempotency.

An OCR or premium engine could not be reached or rejected its credentials. The page is retried on the tier-1 engine where possible; if every path fails, the request or job fails with this code. Retry later. Status 503.

An engine rejected the page or returned an unusable response after retries. Usually a single unreadable page; check pages.failed and warnings[]. Status 500.

Something unexpected failed and no pages could be produced. The request id is in X-Request-Id; retry, and contact support with the id if it persists. Status 500.

You may also see not_found (unknown path or resource, 404), method_not_allowed (405), unauthorized / forbidden for framework-level auth failures, and http_error for anything else mapped from an HTTP exception. They use the same envelope.