Errors

The status code says which class, the body says what exactly; errors expose five common headers plus a scope header for rate limits, so retry logic never has to read the body.

When something fails, the HTTP status code tells you the class of the failure; the body gives the specific cause in the format of that prefix; and every error response also carries four x-praxis-problem-* headers plus one x-praxis-recovery-action, so retry logic only needs the headers, whatever the body looks like.

Status codes

StatusMeaningWhat to do
400Invalid request fields or formatCorrect the parameters; do not retry unchanged
401Missing or invalid credentialsCheck your API key
402Insufficient balance or paid allowanceAdd funds or contact your account administrator
403Access deniedCheck key permissions and resource ownership; contact support if needed
404Resource, model or route not foundCheck the ID, model name and path
408Request timed outCheck connectivity before retrying; verify whether writes completed first
409Resource state or concurrent update conflictRead the current state and adjust the request
413Payload or file too largeReduce the payload or use a URL input supported by the endpoint
422Request content cannot be processedCorrect parameters or input using the error details
429Rate, concurrency or model quota exceededHonor retry-after; let in-flight requests finish when concurrency is full
500Internal platform errorRetry later; contact support with X-Request-Id if it persists
501Capability not implementedUse a supported endpoint; do not retry
502Upstream call failed or returned an invalid responseBack off and retry; switch models or contact support if it persists
503Service or eligible route temporarily unavailableBack off and retry, or select another model
504Upstream response timed outBack off and retry; check write results first to avoid duplicate creation

Error codes

These are common machine-readable codes, not an exhaustive enum for every endpoint. Compatible error bodies may use protocol-specific code/type values. For cross-protocol handling, read x-praxis-problem-code, which can differ from the body code. Codes are case-sensitive.

codeWhen it occurs and what to do
AUTHENTICATION_ERRORThe key is missing or invalid; check or replace your credentials.
VALIDATION_ERRORA parameter violates a format, type or range requirement; correct it using the details.
INPUT_NOT_REPRESENTABLEThe selected model or protocol cannot represent an input option; remove the option or switch models.
NOT_FOUNDThe resource is absent or not visible to this account; check the ID and account.
MODEL_NOT_FOUNDThe model is absent or not visible; select an available name from the model list.
MODEL_PROTOCOL_NOT_OFFEREDThe model does not offer this protocol; use a supported endpoint or another model.
MODEL_PROTOCOL_LINE_UNAVAILABLEQualified routes for the protocol are unavailable; back off and retry or switch models.
GENERATION_NOT_FOUNDThe generation is absent or belongs to another account; check the generation ID from the response headers and the key.
RATE_LIMITEDA rate or concurrency limit was exceeded; honor retry-after and reduce rate or concurrency.
UPSTREAM_ERRORThe upstream call failed or returned an invalid response; retry with backoff when retryable, then switch models or contact support if it persists.
PROVIDER_SELECTION_NOT_ALLOWEDProvider order/only was supplied without BYOK; remove provider selection or provide your own upstream key.
not_implementedThe endpoint or capability is not implemented; use a supported capability instead of retrying.
model_protocol_not_offeredHTTP 404: the model does not declare the requested protocol. Check supported_apis in GET /model/v1/models and use the corresponding endpoint. For Google models, use /google/v1beta/models/{model}:generateContent with a Google request body; changing only the prefix is insufficient.
provider_unavailableHTTP 502: all available routes for this request failed. Retry with backoff; if failures persist, switch models and contact support with X-Request-Id.
thinking_disable_unsupportedHTTP 400: thinking cannot be disabled, for example reasoning_effort="none" on glm-5.3. Omit the disabling setting or choose a supported effort level; switch models if you need thinking disabled.
insufficient_quota / INSUFFICIENT_BALANCEHTTP 402: insufficient balance; body or header codes vary by endpoint. Add funds or contact your account administrator before retrying; avoid immediate retry loops.
validation_error (response_format)HTTP 400, for example: Model "deepseek-flash" does not support json_schema on this API. Switch to a model supporting json_schema on this endpoint. If valid JSON alone is sufficient, use json_object; it does not enforce a schema.
validation_error (named parameter)HTTP 400: with provider.require_parameters=true, the model may reject a requested parameter. For example, param: "logprobs" accompanies does not support the requested logprobs value. Adjust the named parameter or switch models. Disabling the check does not prove the parameter takes effect.

Error body

The body format follows the first segment of the address, same as success responses — your SDK needs no special handling for errors.

Vendor prefixes (/openai /anthropic /google /e2b /tavily): identical to that vendor's official API error body.

// /openai
{ "error": { "code": 401, "message": "Invalid API key." } }
// /anthropic
{ "type": "error", "error": { "type": "authentication_error", "message": "Invalid API key." } }

Praxis prefixes (/agent /model /sandbox /search /meta): standard Problem Details (RFC 9457), Content-Type: application/problem+json.

{
  "type": "https://deepraxis.ai/problems/authentication_error",
  "title": "authentication_error",
  "status": 401,
  "detail": "Invalid API key.",
  "instance": "problem_eqfnxu",
  "code": "AUTHENTICATION_ERROR",
  "retryable": false
}
FieldMeaning
typeURL of the error type, stable, safe to branch on
title / detailHuman-readable summary and specific cause
statusSame as the HTTP status code
instanceID of this error, attach it when contacting support
codeMachine-readable error code
retryableWhether retrying verbatim might succeed

Error headers (five common + one rate-limit header)

The five common headers are independent of body format; the sixth, scope, applies to rate-limit errors:

HeaderMeaningExample
x-praxis-problem-codeCross-protocol classification; may differ from the body's codeAUTHENTICATION_ERROR
x-praxis-problem-kindBroad class — what brokeauthentication_failure
x-praxis-problem-originWho owns it — who can fix it: user (your request or credential), platform (us), upstream_provider (the vendor), etc.unknown
x-praxis-problem-retryableWhether retrying verbatim might succeedfalse
x-praxis-problem-scopeRate-limit layer, when applicable: platform or modelplatform
x-praxis-recovery-actionSuggested actionrelogin

Retrying

  • retryable is true (or status 429 502 503): retry with exponential backoff; for 429 honor retry-after first.
  • Everything else: never retry verbatim — fix the request or the Key first.
Export

On this page