Montek Developers

Errors

Every error has the same shape and a code you can branch on.

{ "error": { "code": "no_plan", "message": "This project has no active plan for langbiang-extract-1.0. Choose one at https://developers.montek.io/pricing." } }

Branch on code; message is for people and may change.

StatusCodeWhat to do
400invalid_requestFix the request: a field is missing or malformed, or the url could not be downloaded. The message names the field.
401unauthorizedThe key is missing, wrong or revoked. Check Authorization: Bearer ….
402no_planThe key's project has no plan for this model. Choose one on Plans.
402overage_cap_reachedThe project has used its overage cap for this period. Raise the cap on Limits.
403forbiddenThe key's scopes do not cover this endpoint. Create a key with the scope.
403project_suspendedThe key's project is suspended. Contact your Montek partner.
404not_foundThe endpoint, job or part does not exist in the key's project. Check the path and the id.
409idempotency_key_reusedThis Idempotency-Key was already used with a different request. Use a new key for a new request.
413file_too_largeA PDF can be up to 10 MB and an image up to 5 MB. Split the PDF or lower the image resolution.
413too_many_pagesA PDF can have up to 30 pages per request. Split it and send the parts.
415unsupported_media_typeSend PNG, JPEG, WebP, GIF or PDF, as multipart/form-data with a file or as JSON with a url.
422document_too_longThe document has more content than one request can return. Split it and send the parts.
422unreadable_documentThe file could not be read. Check that it opens, shows a document and is not password-protected.
429rate_limitedWait Retry-After seconds, then retry. The SDKs do this for you.
500internal_errorMontek failed. Retry with exponential backoff, with the same Idempotency-Key.
503model_unavailableThe model is busy. Wait Retry-After seconds, then retry with the same Idempotency-Key.

Failed calls are never counted toward usage. Error messages never contain your document's content.