Docs

Error Codes

AnyPath gateway public error codes and HTTP statuses

Every AnyPath gateway error response uses the same envelope:

{
  "error": {
    "message": "Human-readable error description",
    "type": "error_code",
    "code": "error_code",
    "param": "parameter_name"
  }
}

At runtime the type field is always identical to code (both carry the canonical error code). The error_type column below is a documentation-only grouping; it never appears as the value of the JSON type field.

The code values below are the complete public registry.

CodeHTTPerror_type (grouping)Default message
auth_required401authenticationAuthentication required. Provide a valid API key in the Authorization header.
auth_invalid401authenticationInvalid API key.
auth_expired401authenticationAPI key has expired.
forbidden403authorizationYou do not have permission to perform this action.
spending_limit_exceeded403authorizationAPI key spending limit exceeded.
rate_limit_exceeded429rate_limitRate limit exceeded. Please retry after the period indicated in the Retry-After header.
supplier_rate_limited429rate_limitThe suppliers of this model are at their rate limits right now. Please retry after the period indicated in the Retry-After header.
invalid_request400invalid_requestThe request was malformed or contained invalid data.
validation_error400invalid_requestRequest body failed validation.
unsupported_request_field400invalid_requestThe selected provider route does not support one or more request fields.
invalid_argument400invalid_requestOne or more arguments are invalid.
request_too_large413invalid_requestRequest body exceeds the maximum allowed size.
invalid_content_type415invalid_requestUnsupported Content-Type header.
model_not_found404not_foundThe requested model does not exist or is not available.
model_unavailable503providerThe requested model is temporarily unavailable.
not_found404not_foundThe requested resource was not found.
provider_error502providerUpstream provider returned an error.
provider_timeout504providerUpstream provider request timed out.
provider_circuit_open503providerCircuit breaker is open for the target provider. Requests are temporarily blocked.
internal_error500serverAn internal server error occurred.
gateway_timeout504serverThe request timed out.
not_implemented501serverThis feature or endpoint is not yet implemented.

Do not depend on non-registry hint fields. Client logic should branch on HTTP status and error.code; use headers such as Retry-After when present.