Errors follow the OpenAI error envelope so existing retry logic keeps working.
{
"error": {
"message": "Insufficient credit balance.",
"type": "insufficient_quota",
"code": "balance_exhausted"
}
}
Status codes
| Status | type | Meaning | Action |
|---|---|---|---|
| 400 | invalid_request_error | Malformed body or unsupported parameter | Fix the request |
| 401 | authentication_error | Missing, invalid or revoked key | Check the Authorization header |
| 403 | permission_error | Key lacks scope, or region blocked | Use a key with the right scope |
| 404 | not_found_error | Unknown model id or route | List models via GET /v1/models |
| 402 | insufficient_quota | Credit balance exhausted | Top up in the dashboard |
| 429 | rate_limit_error | Per-key or per-IP limit hit | Back off exponentially |
| 499 | client_closed_request | Client disconnected mid-stream | No action |
| 500 | api_error | Upstream failure after retries | Retry once, then report |
| 503 | service_unavailable | No healthy channel for this model | Retry later or pick another model |
Retry guidance
- Retry 429 and 5xx with exponential backoff and jitter, starting at 500 ms, capped at 30 s.
- Do not retry 400, 401, 402 or 404 — the same request will fail the same way.
- Include an Idempotency-Key header on retried POSTs to avoid double billing on network flushes.
Die technische Dokumentation wird auf Englisch geführt.