- Body — request semantics: what the client asks the gateway to do
- Headers — transport context: who the request is from and how it arrived
- Token claims — identity: scoped to the auth session
Body fields
Body fields are typed JSON: no header size caps, no latin-1 encoding issues, and any OpenAI-compatible client can send them without custom plumbing.
Headers
Headers carry transport context set by auth layers and middleware. They never reach the provider — a security property, not just style.
Token claims
sub, orgId, model, maxTokens, endUserId, requestSource — identity issued by the backend when minting a signed token.
Precedence
When the same concept can arrive through multiple channels (end-user id):Picking a channel for a new attribute
- Would a client set it on every request without touching auth? → body
- Is it set by infrastructure or auth, and must it never reach the provider? → header (or token claim)
- Does it describe the authenticated identity? → token claim