Errors
HTTP error codes, response formats, and retry rules.
Errors
| HTTP | Meaning | Recommended action |
|---|---|---|
| 400 | Invalid request | Correct JSON and required fields |
| 401 | Invalid, frozen, or revoked key | Rotate or unfreeze the key |
| 402 | Insufficient account balance or key usage limit reached | Add funds or reset/increase the key limit |
| 403 | Model unavailable for the key | Update key permissions |
| 404 | Unknown endpoint, model, or async request | Check the identifier and path |
| 413 | Request too large | Reduce context size |
| 429 | RPM or concurrency exceeded | Honor Retry-After |
| 500 | Gateway error | Retry and inspect logs |
| 502/503/504 | Upstream unavailable or timed out | Retry with exponential backoff |
Retry 429 after Retry-After. Retry 500, 502, 503, and 504 up to three times with 1/2/4-second backoff. Do not automatically retry validation, authentication, balance, or not-found errors.
Use the request public ID from X-Request-ID to correlate the response with the request log.