Skip to main content

Error envelope

Every error response uses a consistent JSON envelope:

Retry logic

Check the retryable field before retrying:

Rate limit errors

When rate limited, use the X-RateLimit-Reset header to determine when to retry:

Best practices

Multiple error codes map to the same HTTP status (e.g., 400 can be INPUT_VALIDATION_ERROR, CONTENT_MODERATION_REJECTED, FILE_NOT_FOUND, or FILE_FORMAT_UNSUPPORTED). Use the code field for precise handling.
When retrying failed requests, use the same idempotency key to prevent duplicate executions in case the original succeeded but the response was lost.
Include the request_id when contacting support. It allows us to trace the exact request through our systems.
Check your balance before submitting large batches. Set up auto-topup in the dashboard to avoid interruptions.

Error code reference

See the full error code table for all 12 normalized error codes with HTTP statuses, retry guidance, and recommended actions.