API referenceReference / 09
Errors & limits
Status codes, retry guidance, and platform limits.
Standard OpenAI-style error responses:
| Status | Meaning | Retry? |
|---|---|---|
401 | Missing or invalid API key | no — fix the key |
400 | Malformed request, unsupported parameter, or insufficient prepaid balance | no — fix the request or top up |
429 | Edge, per-key, or provider rate limit; some gateway spend-limit failures may also use this status | yes for rate limits, no for a reached spend limit |
5xx | Upstream provider issue | yes |
Error bodies follow the OpenAI shape:
json
{"error": {"message": "...","type": "invalid_request_error","code": "..."}}
When a request is rejected by a key budget or your available balance, read the returned error.message and error.code before retrying. A retry cannot raise a hard budget or restore a zero balance; create a new key budget or top up first.
Platform limits #
- Requests are limited to 60/s per IP at the edge. This is separate from optional per-key RPM/TPM limits and the tighter limits on promotional accounts.
- Request bodies up to 50 MB (plenty for base64 vision payloads).
- Streams stay open for up to 10 minutes.