OpenRouter lets me pick the best cost-per-intelligence model per feature and change my mind later with one string. Same SDK, same key, every provider.
Use it when
- Any AI feature in a client system: switch models without changing code.
Pricing
Model prices pass through; OpenRouter adds 5.5% on credit purchases. Example: DeepSeek V4 Pro at $0.66 / $1.98 per million tokens vs $1.32 / $3.96 on Cloudflare Workers AI.
Gotchas, with fixes
Gotcha: Calling it from the browser exposes your API key.
Fix: Always go through a server-side proxy. A Cloudflare Worker is ideal: see the LLM proxy guide.
Provisioning
Pulumi via a Terraform provider · Community Terraform provider
Vendor-published Terraform provider (OpenRouterTeam/openrouter): API keys, guardrails, workspaces, BYOK. Hosted MCP server available.
Instead, consider
- Anthropic API (for client systems) Not for client systems.
Worked examples
Where it fits
- An AI chat or LLM feature: Pick 02.
Every model behind one key. Pick by cost per intelligence.
Sources
Last reviewed by Nicolas Dao