Skip to Content
NexPDF

Errors

Error codes, what they mean and what to do about them.

English

Errors are JSON, with a stable code to branch on and a message for people:

{ "error": { "code": "invalid_request", "message": "the \"instructions\" field is missing" }, "request_id": "req_…" }

Failed requests cost nothing.

StatuscodeMeaningWhat to do
400invalid_requestA field is missing, unknown or malformed.Fix the request; the message says which field.
401unauthorizedThe key is missing, malformed, unknown or revoked.Check NEXPDF_API_KEY.
402payment_requiredThe account's billing needs attention.Update the payment method in the dashboard.
404not_foundNo such job or viewer link, or not this key's.Check the id; results are deleted 24 hours after a job ends.
409not_readyThe job has not finished.Wait for retry-after, or use waitForJob in the clients.
409job_failedThe job failed; it has no result.Read the job's error.
413file_too_largeA file is over the key's size limit.Split the file, or move to a larger plan.
413document_too_longThe text is over the AI endpoints' 300,000 characters.Split the document first.
422fetch_failedA file sent as a link could not be downloaded, or your own time-stamp authority (timestamp_authority) refused or did not answer; the message says why.Check that the link works from the internet and has not expired; for a time-stamp authority, its address and credentials.
422ai_refused, ai_incompleteThe model declined the document, or the answer would be too long.Ask for fewer fields; check the document.
422processing_failedThe document could not be processed (damaged file, wrong password, page out of range), the job needs more units than are left, or a test key was used to edit Excel or Word.Check the file and the message.
422not_availableThis server does not offer what the request asks for, such as ICP-Brasil AD-RT without a time-stamp authority. Refused before any work, at no cost.For AD-RT, give your own ACT in timestamp_authority, or sign at B-B (AD-RB).
429rate_limitedToo many requests this minute.Retried by the clients; wait for retry-after.
429concurrency_limitedToo many requests in progress at once.Retried by the clients; wait for retry-after.
429quota_exceededNo units left this month.Upgrade, or wait for the next month.
503busy, unavailableOur side is busy, or a timestamp authority did not answer.Retried by the clients; wait for retry-after.
503ai_unavailableAI endpoints are not enabled on this server.Write to us.
504timeoutProcessing took too long.Split the job into smaller requests.

In the clients

Every client raises one error type carrying the status, the code, the message, the request id and retryAfter. See client libraries. Retries for rate_limited, concurrency_limited, 503 and network failures happen before the error reaches you.

On this page