Skip to main content
Every extra attribute a client can send to the gateway travels through one of three channels, chosen by a single rule:
  • Bodyrequest semantics: what the client asks the gateway to do
  • Headerstransport context: who the request is from and how it arrived
  • Token claimsidentity: 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

  1. Would a client set it on every request without touching auth? → body
  2. Is it set by infrastructure or auth, and must it never reach the provider? → header (or token claim)
  3. Does it describe the authenticated identity? → token claim