Key Features
200+ Models, One API Key
| Provider | Example Models |
|---|---|
| Anthropic | Claude Opus 4, Sonnet 4, Haiku |
| OpenAI | GPT-4o, GPT-4, o1 |
| Gemini 2.5 Pro, Flash | |
| Meta | Llama 3.1 70B, 405B |
| Mistral | Mistral Large, Codestral |
| Open-source | DeepSeek, Qwen, Phi |
Smart Routing
# Auto-select the cheapest model that passes your requirements
response = client.chat.completions.create(
model="openrouter/auto", # Smart routing
messages=[...],
route="lowest-cost" # or "lowest-latency"
)Fallback Chains
# If primary model is down, auto-fallback
response = client.chat.completions.create(
model="anthropic/claude-sonnet-4-20250514",
extra_body={
"fallbacks": ["openai/gpt-4o", "google/gemini-pro"]
},
messages=[...]
)Price Comparison
Real-time pricing dashboard shows cost per million tokens:
| Model | Input $/M | Output $/M |
|---|---|---|
| Claude Sonnet | $3.00 | $15.00 |
| GPT-4o | $2.50 | $10.00 |
| Llama 3.1 70B | $0.60 | $0.60 |
| Gemini Flash | $0.075 | $0.30 |
Usage Dashboard
Track spending, requests, and token usage per model, per day, per API key.
Use with Popular Tools
Cursor:
Settings > Models > OpenAI Base URL: https://openrouter.ai/api/v1
Continue:
{"models": [{"provider": "openrouter", "model": "anthropic/claude-sonnet-4-20250514"}]}Key Stats
- 3,000+ GitHub stars
- 200+ LLM models
- OpenAI-compatible API
- Smart routing and fallbacks
- Real-time price comparison
FAQ
Q: What is OpenRouter? A: OpenRouter is a unified API gateway for 200+ LLM models with one API key, automatic fallbacks, price comparison, and smart routing.
Q: Is OpenRouter free? A: Free tier with limited credits. Pay-as-you-go with no markup on many models.
Q: How does pricing compare to direct API access? A: Most models are at or near provider pricing. Some open-source models are free.