https://gateway.toolken.ai/v1, add X-Toolken-Key as a default header, and every call the SDK makes is attributed and tracked in your dashboard.
1
Get your keys
You need two keys:
Toolken forwards your OpenAI key to OpenAI verbatim and never stores it.
2
Configure the client
3
Attribute by customer (optional)
Add Use any ID you already have: a user ID, an org slug, an account number. The value is recorded as-is and shows up as a grouping dimension in the dashboard.
X-Toolken-Metadata-Customer-Id to track spend per end-user or organization:4
See your cost
Within seconds your request appears in the dashboard, grouped by agent and customer. The response body is identical to calling OpenAI directly — Toolken is a transparent proxy.
Streaming
The OpenAI SDK’s streaming API works without any changes:How the two keys travel
Toolken reads and strips its ownX-Toolken-* headers before forwarding the request. Your OpenAI key travels in Authorization: Bearer — exactly as it would when calling OpenAI directly.
Next
Custom Properties
All attribution headers and how metadata keys become dashboard dimensions.
Anthropic SDK
Use Claude models through Toolken with the Anthropic SDK.
Gemini SDK
Use Gemini models through Toolken via the OpenAI-compatible path.
Providers Overview
All supported providers and the BYOK model.