Skip to main content
Errors use HTTP status codes and one JSON shape:
message is written for people and safe to show to your users. Branch on code, not on message. No error is ever billed: X-Credits-Used is 0.

Retrying

  • Retry after a wait: 429 rate_limited and 503 temporarily_unavailable carry a Retry-After header in seconds.
  • Retry later, perhaps with other parameters: 502 source_error and 504 timeout.
  • Don’t retry unchanged: 401, 402, 403, 404, 410 and 422 will fail the same way until you change the key, the balance, the terms or the request.
Quote the request_id when you contact support.
Last modified on October 23, 2026