Skip to main content

Errors

The OpenAI error shape​

Each endpoint except /v1/messages sends an error in the OpenAI shape. type and code hold the same value.

{
"error": {
"message": "invalid or revoked key",
"type": "invalid_key",
"code": "invalid_key"
}
}
FieldMeaning
error.messageThe text for a person
error.typeThe proxium code, for example no_route
error.codeThe same value as error.type

The Anthropic error shape​

/v1/messages sends each JSON error in the Anthropic shape. The plain-text errors below are the exception. error.type comes from the HTTP status, and error.message holds the text. The proxium code is not in the body.

{
"type": "error",
"error": {
"type": "rate_limit_error",
"message": "tenant budget exceeded (calls)"
}
}
Statuserror.type
400, 415, 422invalid_request_error
401authentication_error
402, 403permission_error
404not_found_error
413request_too_large
429rate_limit_error
Any other statusapi_error

Plain-text errors​

Some errors come before proxium reads the body. Their body is plain text, not JSON.

StatusCauseEndpoints
400The body is not valid JSON, or a path id is not a UUIDAll POST endpoints except chat/completions and messages, and memory/*
413The body is larger than 32 MiBAll endpoints
415The content type is not JSONAll endpoints except chat/completions and messages
422The JSON does not match the body schemamemory/*

Error codes​

The Endpoints column leaves out the /v1 prefix. "Inference" means chat/completions, messages, embeddings, moderations, rerank and responses. "Media" means images/generations, audio/speech and video/*.

Authentication​

These codes can come from every endpoint.

CodeStatusMeaningWhat to do
missing_key401The request has no Authorization: Bearer headerSend the virtual key as a bearer token. With the Anthropic SDK, use auth_token
invalid_key401The key is not valid, or it is revokedCheck the key. Make a new one on the Keys screen
keystore_unavailable503proxium cannot read the key storeRetry after a short wait
limits_unavailable503proxium cannot read the limits of the keyRetry after a short wait

Request​

CodeStatusEndpointsMeaningWhat to do
bad_json400chat/completionsThe body is not a valid chat requestFix the body. The message names the field
unsupported_media_type415chat/completionsThe content type is not JSONSend Content-Type: application/json
missing_model400embeddings, moderations, rerank, responses, images/generations, audio/speechThe body has no model, or it is emptySend a model
bad_model400images/generations, video/generationsThe model id has a character that is not a letter, a digit, ., _, - or :Send a model id from GET /v1/models
missing_operation400video/operationsThe body has no operationSend the operation from the answer of video/generations
missing_uri400video/downloadThe body has no uriSend the uri of the finished video
forbidden_target400video/operations, video/downloadThe address is not a Google API hostSend the address that the video provider gave
invalid_memory_mode400Inferencex-proxium-memory is not write, recall or offFix the header value
invalid_memory_subject400chat/completions, messages, responsesx-proxium-memory-subject is longer than 256 characters, holds a control character, or is not UTF-8Fix the header value

In /v1/messages, a missing model or max_tokens gets 400 invalid_request_error. The message is model: Field required or max_tokens: Field required.

Routing and providers​

CodeStatusEndpointsMeaningWhat to do
no_route400Inference, mediaNo model of the route is available to this key. The message tells whyRead the message. Refer to the table below
upstream_failed502Inference, mediaEach attempt of the failover chain failed, or proxium could not reach the provider. The message gives the reason of the last attemptRead the reason on the Requests screen. Retry, or add a model to the chain
upstream_error502MediaThe provider answered with an error status. The message holds the status and the body of the providerFix the request for that provider, or check your vendor key
bad_upstream_response502images/generations, audio/speech, video/generationsproxium cannot read the answer of the providerRetry. If it fails again, use a different model
video_failed502video/operationsThe provider reports that the video failedStart a new video
bad_shape500MediaThe provider configuration names an answer shape that proxium does not knowUse a different provider for this request type

The message of no_route tells the cause:

MessageCauseWhat to do
no models available for routeThe project has no provider that serves this model or tierAdd a vendor on the Providers screen
model not permitted for this key: …The model allow-list of the key refuses each model of the routeUse a model that the key allows, or a different key
no providers configuredproxium has no provider at allAdd a vendor on the Providers screen
no image provider configured, no tts provider configured, no video provider configuredThe project has no default provider for this request typeSend a provider/model id of a provider that serves this request type
unknown image provider '…', unknown tts provider '…'The provider in model does not serve this request typeUse a provider id from GET /v1/models

If x-proxium-timeout-ms ends, the message of upstream_failed starts with client deadline exceeded.

Budgets and ceilings​

CodeStatusMeaningWhat to do
tenant_capped429The virtual key reached one of its ceilings. The message names it: calls, cost, rpm or tpmWait for the time in retry-after, 60 seconds
source_capped429The application in x-proxium-source reached its own ceilingWait for the time in retry-after, 60 seconds. Or raise the ceiling of the application under Per-app burn on Overview

The message tells which limit refused the call. On /v1/messages, the message is the only way to tell the two 429 codes apart.

CodeMessage
tenant_cappedtenant budget exceeded (<ceiling>), where <ceiling> is calls, cost, rpm or tpm
source_cappedsource budget exceeded for '<application>' (<ceiling>)

For the ceilings, refer to Budgets and limits.

Memory​

These codes come from the memory/* endpoints.

CodeStatusMeaningWhat to do
bad_request400The body is missing, a field has a bad value, the text is empty or too long, or the subject is not validFix the body. The message names the field
forbidden403The key sent pinned: true, or a person wrote the memory that the key tried to change or removeLeave out pinned. Ask a person to change the memory in the console
not_found404The project has no such conversation or live memoryCheck the id
memory_off409Memory is off for the projectTurn memory on under Settings
query_failed500A database query failedRetry after a short wait