Platform

Errors

Errors follow the shape of whichever protocol you called, so your existing SDK error handling works unchanged.

Shapes

{
  "error": {
    "message": "Insufficient wallet balance",
    "type": "invalid_request_error",
    "code": "insufficient_balance"
  }
}

Status codes

FieldTypeDescription
400invalid_request_errorThe body failed validation. The message names the offending field.
401authentication_errorMissing, malformed, or revoked key — or the account is disabled.
402insufficient_balanceThe wallet cannot cover the reservation. Top up and retry; no model was called.
403model_not_allowedThe key is scoped to a model list that excludes this model.
404model_not_foundNo such model, or it is disabled. Check /v1/models.
413prompt_too_largeThe prompt exceeded a size ceiling. See Limits.
429rate_limit_errorA rate limit, the key's monthly budget, or the concurrency ceiling. Back off and retry.
502upstream_errorThe upstream provider rejected the request. Usually not retryable as-is.
503no_capacityNo capacity for that model right now. Retryable; honour retry-after.
504upstream_timeoutThe upstream did not respond in time. The hold was released; retrying is safe.

Which errors are worth retrying

429, 503, and 504 are transient — retry with exponential backoff. 400, 401, 403, 404, and 413 will fail identically until you change something, so retrying them only burns rate limit. 402 clears as soon as you top up.

Request ids

Every response carries x-request-id. Quote it when contacting support and we can pull the exact request, including the upstream detail that was not sent to you.