Request and response headers
Fabric AI Gateway reads some request headers to authenticate and route a request, and adds some headers to the response. This page lists those headers, and what the gateway changes in the request that the upstream receives. Every other header passes through unchanged in both directions.
Header names aren’t case-sensitive.
Request headers the gateway reads
An admin can set a Key Auth instance to read the gateway key from a list of headers instead, such as Authorization: Bearer and x-api-key, the headers that the OpenAI and Anthropic SDKs send. On such a route, Key Auth reads only those headers. If more than one of them carries a key and the keys differ, the request gets 401 conflicting credentials.
Headers that providers read, such as anthropic-beta and OpenAI-Organization, reach the provider unchanged.
Response headers the gateway adds
On LLM routes, the provider’s response is never compressed, because the gateway reads it to count tokens. If a provider compresses it anyway, the gateway decompresses it and removes Content-Encoding and Content-Length.
What the upstream receives
The gateway forwards the request with these changes:
- Your gateway credential is removed. The
fg-api-keyheader is always removed. So is the header that the authentication plugin read the key or token from. - The upstream credential is added. For a provider, the gateway adds the credential from the connection in the provider’s own header, such as
Authorization: Bearer …orx-api-key, or signs the request, for example with AWS Signature Version 4 for Amazon Bedrock. A client header with the same name is replaced. - Forwarding headers are set.
X-Forwarded-Forgets your address appended.X-Forwarded-ProtoandX-Forwarded-Hostare set if you didn’t send them.Hostis the upstream’s host. - Console cookies are removed. Cookies whose names start with
fabric_, which the Fabric console sets, are removed from theCookieheader. Other cookies pass through. - Hop-by-hop headers are removed.
Connection,Keep-Alive,Proxy-Authenticate,Proxy-Authorization,TE,Trailer,Transfer-Encoding, andUpgradearen’t forwarded. BecauseUpgradeis removed, WebSocket connections don’t work through the gateway. - Compression is turned off where the gateway reads the response.
Accept-Encodingis removed on LLM and MCP routes, and on REST routes whose responses are transformed or validated. - Trace context is added. The upstream receives W3C
traceparentand B3 headers for the current trace.
Next steps
- Send your first authenticated request by following Authenticate and send a request.
- Look up what each error status means in Gateway error codes.
- Configure rate limit headers in Rate limits.

