The AI Gateway supports the following headers:

Request Headers

NameDescription
AuthorizationYou can send your API key as bearer token in the Authorization header.
x-tfy-metadataYou can send metadata in the x-tfy-metadata header. This is stringified json of key value pairs. This can be used to route your request based on config and also filter out metrics.
x-tfy-provider-nameThis required for responses api, file upload api and batch apis. You can send the provider account name in the x-tfy-provider-account header. This is used to route your request to the correct provider account.
x-tfy-strict-openaiboolean, This is used to enable strict openai compatibility. This needs to be set false for claude reasoning model responses with thinking tokens in response

Response Headers

NameDescription
x-tfy-resolved-modelThis field contains the final truefoundry model id that was used to process the request. The original model id can be overriden due to load balancing or fallback models
x-tfy-applied-configurationsThis field contains the applied configurations (as a dictionary) including load balancing, fallback, model config, applied guardrails and rate limiting