Skip to main content
Every error has the same body, with exactly two fields:
  • code is stable and machine-readable. Branch on it.
  • message is for people and may be reworded. Do not parse it.
Errors never contain stack traces, internal identifiers or configuration.

Error codes

These codes will not be renamed within v1.

Not found, not forbidden

A 404 means “no such resource that you can see”. A resource in another organisation returns the same 404 as one that does not exist, so identifiers cannot be used to discover what exists elsewhere. A request to a path or method that does not exist at all is answered by the web server’s own 404 or 405, which may not have a JSON body.

Common conflicts

Errors during streaming

Once a stream has started, the HTTP status is already 200. A failure after that point arrives as a final answer.error event carrying the same code and message. Always read the final event. See Streaming.

Retrying safely

  • Retry only 429, 500, 502 and 503, with exponential backoff and jitter.
  • Honour Retry-After when present; it is omitted when no wait is known.
  • When retrying a question, send the same idempotency_key so a request that actually succeeded is not asked, and paid for, twice.
Last modified on September 26, 2026