Skip to main content

Request headers

Header names are not case-sensitive. The endpoint names below leave out the /v1 prefix where an endpoint has one.

Authentication and body​

HeaderEndpointsValueEffectBad value
AuthorizationAll endpointsBearer <virtual key>Identifies the project and the keyMissing: 401 missing_key. Not valid or revoked: 401 invalid_key
Content-TypeAll POST endpointsapplication/json, or a type that ends in +jsonMarks the body as JSON415. On chat/completions the code is unsupported_media_type. On the other endpoints the body is plain text

proxium reads the virtual key from Authorization only. It does not read x-api-key. The word Bearer and one space must come before the key.

Routing and attribution​

HeaderEndpointsValueDefaultEffectBad value
x-proxium-sourcechat/completions, messages, embeddings, moderations, rerank, responses, images/generations, audio/speech, video/*A name for the calling application, for example support-botThe project slugSelects the routing chain and the budget of the application. Records the cost against the applicationNone. proxium takes any value that is not empty
x-proxium-timeout-mschat/completions, messages, embeddings, moderations, rerank, responsesA positive integer, in millisecondsNo limit for the whole chainSets a time limit for all attempts of the failover chain together. The maximum is 120000. proxium reduces a larger value to the maximumproxium ignores a value that is not a positive integer

If the time limit of x-proxium-timeout-ms ends, proxium stops the chain. It answers 502 upstream_failed, and the message starts with client deadline exceeded.

Memory​

HeaderEndpointsValueDefaultEffectBad value
x-proxium-memorychat/completions, messageswrite, recall or offwritewrite: proxium records the call when memory is on. recall: proxium also adds the matching memories to the request, as one system message. off: proxium does not record the call400 invalid_memory_mode
x-proxium-memoryresponseswrite, recall or offwriterecall acts as write. off: proxium does not record the call400 invalid_memory_mode
x-proxium-memoryembeddings, moderations, rerankwrite, recall or offwriteNo effect400 invalid_memory_mode
x-proxium-memory-subjectchat/completions, messages, responsesThe end user that the call is about. At most 256 characters, with no control charactersThe user field of the bodyFiles the remembered call under this end user400 invalid_memory_subject, only when proxium records the call

The values of x-proxium-memory are not case-sensitive. An empty value is the same as write.

proxium records a call only when memory is on for the project and for the application. recall and x-proxium-memory-subject have an effect only on a call that proxium records. For how memory works, refer to Memory.

Correlation​

proxium stores these values with the usage record of the call. They let you group calls by task, turn or agent. They have no effect on routing or budgets.

Endpoints: chat/completions, messages, embeddings, moderations, rerank, responses, images/generations, audio/speech and video/generations.

HeaderValueBad value
x-proxium-task-idYour id for a task. GET /usage/me groups the cost by this id in by_taskNone
x-proxium-turn-idYour id for one turn of a conversationNone
x-proxium-agent-idYour id for the agent that made the callNone
x-proxium-trigger-kindWhat started the call, in your own wordsNone
x-proxium-trigger-detailMore detail about the triggerNone
x-proxium-iterationAn integer, for example the step number of an agent loopproxium ignores a value that is not an integer
x-proxium-distil-savedAn integer: the tokens that your client removed from the prompt before the callproxium records 0 for a value that is not an integer

Response headers​

The value of retry-after is in seconds.

HeaderWhen proxium sets itValue
retry-after429 tenant_capped or source_capped60
content-typeA streamed answertext/event-stream
cache-controlA streamed answerno-cache
x-accel-bufferingA streamed answerno
content-typeaudio/speech and video/downloadThe media type of the audio or the video

For the error codes, refer to Errors. The API reference lists the headers of each endpoint.