Documentation

Handle errors without losing the request context.

{
  "text": "Complex source content in the selected language.",
  "locale": "en",
  "mode": "simple-language"
}

SDK and cURL examples available

Error envelope

The Version 2 production error envelope contains an error object with stable code and message fields.

json
{
  "error": {
    "code": "invalid_request",
    "message": "Check the request fields."
  }
}

The optional details object carries machine-readable context such as retryAfterSeconds.

HTTP response headers carry authentication and retry metadata where applicable.

Required error catalog

The following codes are the current Version 2 contract.

HTTPCodeMeaningClient action
400invalid_jsonThe request body is not valid JSONCorrect the JSON body
400invalid_requestA field is missing, unknown, or invalid, or text exceeds 10,000 charactersCorrect the request
400invalid_idempotency_keyA job or batch request has no valid Idempotency-KeySend a unique key of at most 255 characters
400invalid_webhook_endpointThe selected webhook endpoint is missing or inactiveChoose an active endpoint or use polling
401invalid_api_keyThe Bearer token is missing, invalid, or revokedCheck or replace the API key
402billing_requiredBilling must be updated before processing can continueUpdate billing in the application
403subscription_requiredThe workspace has no active entitlementChoose a plan or contact support
403email_not_verifiedNo owner or administrator email is verifiedVerify an eligible account email
404job_not_foundThe job does not exist, belongs to another workspace, or has expiredStop polling and create a new job if needed
404batch_not_foundThe batch does not exist, belongs to another workspace, or has expiredStop polling and create a new batch if needed
429rate_limitedThe request rate has been reachedRespect Retry-After
429concurrency_limitToo many requests are processing at the same timeRetry after an active request finishes
429allowance_exhaustedThe monthly character limit is reached and additional usage is unavailable or disabledWait for the next billing period or enable additional usage on an eligible plan
502processing_failedThe service could not process the textRetry safely and contact support with the request ID if it continues

For every error, document retryability, billing effect, log visibility, and support information.