Base URL
The base URL depends on which SDK you are using:
If you are sending raw HTTP requests, always include the full path:
https://gateway.toolken.ai/v1/chat/completions, https://gateway.toolken.ai/v1/messages, etc. Provider routing is automatic based on the path and model name.
Two keys on every request
Every request requires two credentials:
The gateway validates
X-Toolken-Key, then strips it before forwarding so the provider never sees it.
Supported endpoints
No endpoint is invented or proxied speculatively. Only the paths listed above are accepted.
Provider detection
The gateway detects the upstream provider in this order:- Explicit
X-Toolken-Providerheader (e.g.X-Toolken-Provider: gemini) — always wins - Path:
/v1/messagesalways routes to Anthropic - Model name prefix (e.g.
gpt-*,o1-*to OpenAI;claude-*to Anthropic;gemini-*to Google) - Error — cannot determine provider; attach
X-Toolken-Provideror include a recognizable model name