Error Reference

Error codes and what they mean

All proxy errors return JSON with a single error field:

1{"error": "error message here"}

Error codes

401 Unauthorized

ErrorCause
missing proxy keyNo sk-proxy-... value found in Authorization: Bearer, x-api-key, or x-goog-api-key headers
invalid proxy keyKey not found or hash doesn’t match

403 Forbidden

ErrorCauseResolution
key_revokedKey has been revokedCreate a new key
key_expiredKey is past its expiry dateCreate a new key or extend the expiry
ip_blockedClient IP not in the key’s allowlistAdd the IP to the key’s allowed IPs, or remove IP restrictions
provider_not_allowedProvider not in the key’s allowed providersUpdate the key’s provider list
model_not_allowedModel not in the key’s allowed modelsUpdate the key’s model list
spend_exceededKey has reached its spend limitIncrease the limit or wait for the reset period
insufficient_creditsOrganization has no remaining creditsPurchase more credits in Settings > Billing
budget_exceededOrganization budget config limit reachedIncrease the budget or wait for the period to reset

429 Too Many Requests

ErrorCauseResolution
rate_limitedKey has exceeded its RPM limitReduce request rate or increase the key’s RPM limit
organization_rate_limitedOrganization has exceeded its RPM limitReduce request rate or increase the org RPM limit

Check the X-RateLimit-Remaining and X-RateLimit-Reset response headers to manage your request rate.

400 Bad Request

ErrorCause
unknown providerURL path doesn’t start with /openai/, /anthropic/, or /gemini/
provider not configuredProvider exists but has no API key configured on the server
invalid request bodyJSON parsing failed
model must use provider/model formatUnified mode: model name couldn’t be resolved to a provider

502 Bad Gateway

ErrorCause
upstream request failedThe provider didn’t respond (connection error, timeout)

For non-streaming requests, the gateway retries with exponential backoff (up to 2 retries, 250ms–4s). A 502 means all attempts failed. Streaming requests are not retried because partial data may have already been sent to the client.

503 Service Unavailable

ErrorCause
provider temporarily unavailableThe provider’s circuit breaker is open due to repeated failures
service_unavailableInternal error (e.g., Redis rate limiter unreachable)

Each provider has a circuit breaker that opens after 10 failures or a 50%+ failure rate over 20+ requests within a 60-second window. Once open, all requests to that provider are rejected for a 30-second cooldown. After the cooldown, a single probe request is allowed through — if it succeeds, the circuit closes and traffic resumes normally.

Rate limit headers

On rate-limited responses, these headers are included:

X-RateLimit-Limit: 60
X-RateLimit-Remaining: 0
X-RateLimit-Reset: 1712345678

Budget warning header

When your organization is approaching its budget limit but requests are still allowed:

X-Budget-Warning: approaching_limit