API referenceReference / 09

Errors & limits

Status codes, retry guidance, and platform limits.

Follow updates

Standard OpenAI-style error responses:

StatusMeaningRetry?
401Missing or invalid API keyno — fix the key
400Malformed request, unsupported parameter, or insufficient prepaid balanceno — fix the request or top up
429Edge, per-key, or provider rate limit; some gateway spend-limit failures may also use this statusyes for rate limits, no for a reached spend limit
5xxUpstream provider issueyes

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.
Errors & limits — Docs