One API.
Every AI Model.
Total Control.
Access the world's leading AI models through a single API. Smart routing, transparent pricing, and unified billing for developers.
Simulated with live catalog prices · sign in to run real requests
One key · every provider
The router layer your AI stack was missing
Everything between your application and ten model providers: routing, retries, metering, billing and observability.
Smart routing
One model name — `auto` — picks the best model for cost, latency or quality on every request.
Automatic fallback
Provider down or rate-limited? The router retries on a second provider before the request fails.
Unified billing
One balance for GPT, Claude, Gemini, DeepSeek and more. No more five dashboards and prepaid islands.
Prompt caching
Cached input tokens are billed at up to 90% less and reported separately in your usage.
Usage analytics
Per-key, per-model and per-day cost breakdowns with token-level request logs.
Multiple protocols
OpenAI chat completions, Anthropic messages and Gemini generateContent — same key, same balance.
Secure API keys
Keys are hashed at rest, scoped per model, per IP and per budget — revocable instantly.
Cost optimization
Set daily and monthly spend caps so a runaway agent can never surprise your invoice.
Live pricing
Official provider list prices, per 1M tokens in USD. Billed per request with no minimums.
| Model | Context | Input / 1M | Output / 1M | Cache / 1M | Status | |
|---|---|---|---|---|---|---|
GPT-5.1 OpenAI · gpt-5.1 | 400K | $1.5 | $12 | $0.15 | Live | |
Claude Opus 4.5 Anthropic · claude-opus-4-5 | 200K | $6 | $30 | $0.6 | Live | |
GPT-5.1 Codex OpenAI · gpt-5.1-codex | 400K | $1.5 | $12 | $0.15 | Live | |
Claude Sonnet 4.5 Anthropic · claude-sonnet-4-5 | 200K | $3.6 | $18 | $0.36 | Live | |
Gemini 3 Pro Google · gemini-3-pro | 1.0M | $2.4 | $14.4 | $0.24 | Live | |
DeepSeek V3.2 DeepSeek · deepseek-chat | 128K | $0.336 | $0.504 | $0.034 | Live | |
GPT-5.1 mini OpenAI · gpt-5.1-mini | 400K | $0.3 | $2.4 | $0.03 | Live |
Three protocols. One gateway.
Point any existing SDK at HanlinRouter. Your OpenAI, Anthropic and Gemini integrations keep working — only the base URL and key change.
OpenAI-compatible
https://hanlinrouter.site/v1
Anthropic Messages
https://hanlinrouter.site/api
Gemini API
https://hanlinrouter.site/v1beta
from openai import OpenAI
client = OpenAI(
api_key= 0