Save up to 90% on LLM costs

Route smarter. Spend less. Unlock the full power of LLMs.

An API-first LLM router that chooses the best model for each prompt—automatically. Save time, money, and complexity.

Incoming Prompt:
GPT-4
GPT-4
$0.03/1K tokens
Claude
Claude
$0.015/1K tokens
Mistral
Mistral
$0.007/1K tokens
✨ Routed to GPT-4 - Most cost-effective for this prompt

Drop-in replacement. Zero complexity.

Replace your existing OpenAI client with TokenRouter in seconds. Same API, massive savings.

PythonPython
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)
TokenRouterTokenRouter SDK
OpenAIOpenAI SDK
1

Install TokenRouter

pip install tokenrouter

2

Change one import

Replace openai with tokenrouter

3

Start saving immediately

Set model="auto" and watch the savings roll in

Compatible with existing OpenAI code
No breaking changes required

Route across 40+ models

Access the best models from major AI providers through one unified API

OpenAI logo
Anthropic logo
Google logo
Meta logo
Mistral logo
DeepSeek logo
OpenAI logo
Anthropic logo
Google logo
Meta logo
Mistral logo
DeepSeek logo

Simple pricing for your team

Check out our different pricing plans.

Free

$0/mo

50,000 routed tokens/month

Limited to 2 Providers
Playground Access
OpenAI SDK Compatible
Email support
Start Free
Most Popular

Pro

$29/mo

5,000,000 routed tokens/month

All Free features
Access to all support providers
Function calling + tool support
Savings dashboard + token usage analytics
Slack support
Get Started

Scale

$99/mo

50,000,000 routed tokens/month

All Pro features
Multi-key API access (per developer)
Model preference overrides
Advanced usage analytics
Early access to new routing modes
Get Started

FAQs

Frequently asked questions

Everything you need to know about TokenRouter.

What does TokenRouter choose which models to use?

You connect your own API keys (OpenAI, Anthropic, Mistral, etc.). We route intelligently to cut costs.

Is it really compatible with OpenAI's API?

Yes. TokenRouter is a drop-in replacement for OpenAI's API and works with all your existing code.

What providers and models do you support?

OpenAI, Anthropic, Mistral, DeepSeek, Google, Meta (Llama). More soon.

How much can I actually save?

Each plan includes a monthly routed token allowance; overages are paused or prompt an upgrade.

Do you support streaming?

Yes. Streaming is supported for all providers and models that support it.

Can I override the automatic routing?

Soon. Currently you can define the pool of models and providers to use for each request.