Every LLM.
One API.
OpenAI- and Anthropic-compatible. Switch models, keep your code.
curl https://anyrouter.dev/api/v1/chat/completions \ -H "Authorization: Bearer $ANYROUTER_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "anyrouter/auto", "messages": [{"role": "user", "content": "Hi"}]}'
Hi! I'm here and ready to help. What can I do for you today? Ask me anything, from code and writing to quick facts.
How a request routes
Your app sends one request to AnyRouter. AnyRouter checks the key, picks a route and, if an upstream fails, falls back to the next one. You are billed once.
Fig. 1POST /v1/chat/completions
CLI
IDE
Your app
AnyRouterkey · route · fallback
Workers AI429 → fallback
OpenRouter200
CLI
IDE
Your app
AnyRouterkey · route · fallback
Workers AI429 → fallback
OpenRouter200
- 1Apps send POST /v1/chat/completions
- 2AnyRouter checks the key, picks a route by model
- 3Upstream 1 fails, falls back to upstream 2
- 4The answer streams back
FAQ
What is AnyRouter?
OpenAI-compatible gateway. 258 models, 17 providers. Free models, $4 credit on Go, $0 markup on your own keys.
How do I call models through AnyRouter?
Point your SDK at one base URL and reference models as provider/model, as in the code above. The table lists every model with its price per 1 million tokens.
Do you take a cut if I bring my own keys?
No. Route through your own provider keys and the markup is $0: what you pay upstream is exactly what you pay.
How do I get started?
Sign up in seconds, no card required. Free models cost nothing, Go adds $4 credit, and the table above shows what every other model costs.