Skip to main content
Every error is JSON in the OpenAI envelope:
WebSocket routes write the same envelope as a raw HTTP response when the upgrade is rejected (bad key, rate limit, zero balance, invalid params).

400 — invalid request

401 — authentication

402 — out of credits

403 — forbidden

404 — not found

409 — conflict

413 — payload too large

429 — rate limited

5xx — server errors