An API-first LLM router that chooses the best model for each prompt—automatically. Save time, money, and complexity.
Replace your existing OpenAI client with TokenRouter in seconds. Same API, massive savings.
from tokenrouter import TokenRouter
client = TokenRouter(api_key="tr_QI8SoG2")
response = client.chat.completions.create(
model="auto",
mode="balanced",
messages=[{
"role": "user",
"content": "Hello"
}]
)
print(completion.choices[0].message.content)
pip install tokenrouter
Replace openai
with tokenrouter
Set model="auto"
and watch the savings roll in
Access the best models from major AI providers through one unified API
Check out our different pricing plans.
50,000 routed tokens/month
5,000,000 routed tokens/month
50,000,000 routed tokens/month
FAQs
Everything you need to know about TokenRouter.
You connect your own API keys (OpenAI, Anthropic, Mistral, etc.). We route intelligently to cut costs.
Yes. TokenRouter is a drop-in replacement for OpenAI's API and works with all your existing code.
OpenAI, Anthropic, Mistral, DeepSeek, Google, Meta (Llama). More soon.
Each plan includes a monthly routed token allowance; overages are paused or prompt an upgrade.
Yes. Streaming is supported for all providers and models that support it.
Soon. Currently you can define the pool of models and providers to use for each request.