docs
docs

Errors & rate limits

Errors use OpenAI's shape, so SDKs raise them the way they raise OpenAI's. Every response carries an x-request-id.

statuscodemeaning
401invalid_api_keymissing, wrong or revoked key
402insufficient_balancetop up, or pay this request with x402
400invalid_buyback_tokenx402 only: the X-Buyback-Token is not a mint, or not eligible for buybacks
404model_not_foundunknown or unlisted model id
429rate_limitedover the rate limit of 600 requests per minute per key; wait for Retry-After
503no_capacityno capacity for this model right now; wait for Retry-After
error body
{
  "error": {
    "message": "Insufficient balance: this request needs about $0.0123.",
    "type": "insufficient_balance",
    "code": "insufficient_balance",
    "param": null
  },
  "request_id": "7f3c..."
}

We retry a failed upstream attempt for you once before the first byte of a response; a stream that has started is never switched mid-way, and media generations are never retried. Quote the x-request-id when you contact us.