Skip to content

Errors & retries

Errors are returned as JSON with a stable machine-readable error code and the matching HTTP status.

{
"error": "rate_limited",
"message": "Too many requests.",
"retry_after_ms": 850
}
HTTPerrorRetry?Notes
400invalid_requestNoA parameter failed validation — fix the request.
401missing_api_key / unknown_api_keyNoSee Authentication.
403inactive_api_key / account_blockedNoKey disabled or account suspended.
402insufficient_creditsNoTop up. Body includes required and balance.
429rate_limitedYes, after retry_after_msYou exceeded your per-minute limit.
409request_in_progressYesAn identical idempotent request is still running.
422(idempotency conflict)NoAn Idempotency-Key was reused with a different body.
503service_temporarily_unavailable / too_many_concurrent_requestsYes, with backoffTransient capacity limit.
504result_timeoutYesThe upstream fetch exceeded deadline_ms.
  • Retry 429 / 503 / 504 / 409 with exponential backoff. When retry_after_ms is present, wait at least that long before retrying.
  • Never retry 400 / 401 / 402 / 403 — the request won’t succeed until you change it.
  • The official SDKs already retry transient errors for you (default 2 retries) and expose a retryable flag on the error.