Skip to main content

Error shape

Every error has the same body:
Branch on code, show message to people, and read details when it’s there.

Codes

Rate limits

Assistants share the same limits. A 429 comes with a Retry-After header in seconds.

Retrying safely

  • GET requests are always safe to retry.
  • Add an idempotency_key to POST /demos. Sending the same key again returns the first demo (200) instead of creating another.
  • Retry 429 and 503 after a short wait. Don’t retry 4xx errors without changing the request.