When you send a call through Inferock, we do not pass your request headers straight through to the model provider. For each route we build a new, short list of headers. This page lists exactly what we send, what we change, and what we leave out on purpose.
This page covers the headers and the body we send upstream. Streaming is chosen by the stream field in your body, never by a header. On the way back, for calls with your own key we return the provider's response headers except content-encoding, content-length, transfer-encoding and any access-control- header; on managed Inferock Serve we return only content-type, cache-control and retry-after.
Calls to Claude models with your own key
This covers both ways of calling a Claude model: the messages route (POST /v1/messages) and the chat completions route (POST /v1/chat/completions).
We send these headers:
x-api-key: the provider key you saved with us. Your Inferock key is never sent.content-type: alwaysapplication/json.anthropic-version: on the messages route we send the value you sent, or2023-06-01if you sent none. On the chat completions route we send the value you sent when it is written as a date such as2023-06-01, or2023-06-01if you sent none or sent a value in another form.anthropic-beta: we now send it when every value in your list is valid; if any value is not valid we leave the whole header out and the call still runs. This is new and we have not yet checked it end to end on the live service; we will update this page when that check is done.
We leave out every other header you send, for example accept, user-agent, idempotency-key, x-request-id and any custom x- header. We do not add any application headers of our own. The only other headers on the call are the standard transport headers every HTTP client sets, such as host and content-length.
Calls to other models with your own key
- Models that use the chat completions request format: we send
authorizationwith the provider key you saved with us, andcontent-type: application/json. - The responses route (
POST /v1/responses): we sendauthorizationwith the provider key you saved with us, andcontent-type: application/json. - Gemini models: we send
x-goog-api-keywith the provider key you saved with us, andcontent-type: application/json.
Nothing else from your request headers is sent.
Calls on managed Inferock Serve
- We send
authorizationwith our own key for the hosting partner, andcontent-type: application/json. - Your Inferock key and your request headers are not sent to the hosting partner.
Calls on our encrypted routes
- We relay only the framing headers the encrypted connection needs, we add
authorizationwith our own key for the enclave host plus the headers that host requires for routing and metering, and we pass your encrypted request through unchanged, byte for byte. We cannot read it.
The request body
- On our standard routes we read your JSON request and write it out again before we send it, so the bytes may differ, for example in spacing or the order of fields. We also make the changes listed below, and no others.
- On both Claude routes, when the model name is a Claude 4.7 or later 4 series name or a Claude 5 series name, we remove
temperaturefrom the body. - On the chat completions route to a Claude model, we build a new messages format request from these fields only:
model,messages,max_tokens(ormax_completion_tokens; if you send neither we set 1024),stream,temperature,top_p,stop(sent asstop_sequences),toolsandtool_choice. System messages are joined into thesystemfield. Any other field is left out. - On the chat completions route to other models: when
streamis true we setstream_options.include_usageto true; for reasoning model names we movemax_tokenstomax_completion_tokensand removetemperature; we removemetadataunlessstoreis true. - On the responses route we move
max_tokenstomax_output_tokensand translateresponse_formatintotext.format. - For Gemini models we translate your request into the Gemini generate content format.
- On managed Inferock Serve, when
streamis true we setstream_options.include_usageto true, and we setmax_tokensormax_completion_tokensto the model's published ceiling when you send none or a higher value.