Skip to main content

Errors & Status Codes

Standard codes

CodeMeaning
200Success
400Malformed request
401Missing or invalid API key
404Resource not found
500Internal error

OpenProxyAI-specific codes

CodeMeaningSDK exception
402Budget exceededBudgetExceededError
429Rate limit hit (requests/min or tokens/min)RateLimitError
446Blocked by an enforcing policyPolicyViolationError

These map directly to the request pipeline stages that can reject a request — see Request Pipeline.

Provider-side errors

An error from the upstream provider itself (not from OpenProxyAI's own pipeline) surfaces as ProviderError in the SDKs, with the original provider identified so you can distinguish "OpenProxyAI blocked this" from "the model provider itself errored."

Retry guidance

BudgetExceededError and RateLimitError both carry a retry_after (Python) / equivalent field indicating when to retry. PolicyViolationError is not retryable as-is — the request content itself needs to change, or the policy needs to be reconfigured (see Policies & Guardrails).