AI Gateway
Responses
POST
Pass-through to the OpenAI Responses API. Request and response bodies follow the standard OpenAI Responses schema. The gateway infers the provider from the model name.
Headers
Your Toolken API key. Validated by the gateway and stripped before forwarding.
Your provider key in Bearer format (BYOK), e.g.
Bearer sk-.... Forwarded untouched, never stored.Primary attribution channel. JSON object of key-value pairs (e.g.
{"agent":"research-agent","customer_id":"cust_abc"}). Each key becomes a groupable dimension in the dashboard.Flat-header shorthand.
X-Toolken-Metadata-Agent: research-agent writes metadata key agent. Equivalent to sending the same key in X-Toolken-Metadata.Sets the
feature metadata key. Use to group costs by agent name, workflow, UI surface, or job type.Sets the
customer_id metadata key. Use to attribute costs to an end-customer, org slug, or account ID.Body
Model identifier for the OpenAI Responses API (e.g.
gpt-4o).Input text or structured input array. Follows the standard OpenAI Responses schema.
If true, the gateway streams Server-Sent Events back from the provider.
Response
Unique response ID.
Object type identifier.
The generated output. Shape depends on the model and input type.
Token usage counts. Shape follows the standard OpenAI Responses API.