Skip to main content

Error Handling

All requests return error and error_info fields when an argument is missing or incorrect, or when a problem occurs during processing.

warning

Most API errors return HTTP 200 with error details in the response body. The exceptions are:

  • http_unauthorized — HTTP 401
  • http_max_requests — HTTP 429

The error_info.id field is the reliable error identifier across all endpoints.

Error response format

{
"error": "Human-readable error message",
"error_info": {
"id": "error_id_string",
"message": "Human-readable error message",
"detail_field": "additional context (varies by error)"
}
}
id string

Programmatic error identifier

message string

Human-readable error message

detail object (optional)

Additional context (varies by error)

Error categories

Retryable errors

Transient errors that may succeed on retry with exponential backoff.

IdDescriptionDetail fieldsHTTP StatusEndpoints
http_max_requestsMonthly quota or per-minute rate limit exceededlimit_name, limit_value, count429All
sys_exceptionInternal server error200All
connection_closedClient disconnected before response was sent200All

Example http_max_requests response:

{
"error": "Too many requests",
"error_info": {
"id": "http_max_requests",
"message": "Too many requests",
"limit_name": "page_monthly_limit",
"limit_value": 5000,
"count": 5001
}
}

Authentication errors

Returned when credentials are invalid or the account is not active.

IdDescriptionHTTP StatusEndpoints
http_unauthorizedInvalid or missing app_id/app_key headers401All
unauthorized_token_requestInvalid app_token, or attempted batch/async with app token200v3/text, v3/latex, v3/strokes
account_disabledAccount has been disabled401All
expired_licenseOn-premises license has expired401All

Request validation errors

Returned when the request body or parameters are malformed or out of range.

IdDescriptionDetail fieldsEndpoints
json_syntaxJSON body could not be parsedAll
sys_request_too_largeRequest body exceeds size limit (5 MB for images, 512 KB for strokes). See Limits & QuotasAll
image_missingNo src or url field in request bodyv3/text, v3/latex, v3/batch
file_missingNo file in multipart form-data requestv3/text, v3/latex, v3/pdf
strokes_missingNo strokes field in request bodyv3/strokes
strokes_syntax_errorStrokes JSON is malformed or missing x/y arraysv3/strokes
opts_value_out_of_rangeNumeric parameter outside valid rangename, valueAll
opts_number_requiredParameter must be a number (e.g. beam_size required when n_best is set)name, valuev3/text, v3/latex
opts_boolean_requiredParameter must be a boolean. Accepted values: true, false, 1, 0, "true", "false" (case-insensitive). Other values (e.g., "yes", -1) are rejectedname, valueAll
opts_string_requiredParameter must be a stringname, valueAll
opts_object_requiredParameter must be an objectname, valueAll
opts_expected_arrayParameter must be an arrayname, valuev3/text, v3/latex
opts_string_array_requiredParameter must be a string arrayname, valuev3/text, v3/latex
opts_array_length_mismatchArray has wrong length (e.g. math_delims must be [begin, end])name, valuev3/latex
opts_property_requiredObject missing required properties (e.g. region needs top_left_x, top_left_y, width, height)name, valuev3/text, v3/latex
opts_property_invalidObject contains unknown propertiesname, valuev3/text, v3/latex
opts_unknown_formatUnknown value in formats arrayformatsv3/text, v3/latex
opts_unknown_ocrUnknown value in ocr arrayocrv3/latex
opts_unknown_ocr_behaviorocr_behavior must be "latex" or "text"v3/batch
opts_unknown_alphabets_allowedUnknown key in alphabets_allowed object. See supported languagesv3/text, v3/latex, v3/batch, v3/pdf
opts_unknown_data_optionUnknown key in data_options objectv3/text
opts_bad_data_optionsdata_options must be an objectv3/text
opts_bad_callbackInvalid callback configuration (e.g. post not a string, reply not an object, or reply contains batch_id)post?, reply?, batch_id?v3/text, v3/latex, v3/batch
opts_section_numberingMultiple section numbering flags set. Only one of auto_number_sections, remove_section_numbering, or preserve_section_numbering can be set per requestv3/pdf
opts_unknown_timespanUnknown timespan value in usage queryv3/ocr-usage

Processing errors

Returned when the input is valid but the content could not be processed.

IdDescriptionEndpoints
image_download_errorCould not download image from URL (timeout after 15s, exceeds 10 MB, or URL unreachable)v3/text, v3/latex, v3/batch
image_decode_errorImage data could not be decoded (corrupt or unsupported format)v3/text, v3/latex, v3/batch, v3/pdf
image_no_contentNo recognizable content found in imagev3/text, v3/latex, v3/batch
image_not_supportedImage content type not supported by the OCR enginev3/text, v3/latex, v3/batch
image_max_sizeImage is too large to processv3/text, v3/latex, v3/batch
strokes_no_contentNo recognizable content found in strokesv3/strokes
math_confidenceRecognition confidence below thresholdv3/text, v3/latex, v3/batch
math_syntaxCould not parse recognized content as valid mathv3/text, v3/latex, v3/batch
pdf_encryptedPDF is encrypted and cannot be readv3/pdf
pdf_missingNo url field in PDF request bodyv3/pdf
pdf_unknown_idPDF ID not found (expired or invalid)v3/pdf
pdf_page_limit_exceededPDF exceeds maximum page limitv3/pdf
batch_unknown_idBatch ID not foundv3/batch