Cut your coding-agent bill.Pay for Opus only when a task needs it.
CodeRouter sends each Claude Code, Cursor or Aider request to the cheapest model that can handle it — Claude Haiku 5.5, Kimi K2.6, Claude Sonnet 5.5 or Claude Opus 5.5 — and moves up only when tests or errors show a failure or an agent stops making progress. One base URL, no code changes.
96–100% of tasks solved for 56–70% less than sending every request to Opus, across runs of TokenWatt's 176-task coding benchmark.
How it was measuredTokenWatt is a measurement project from the same team as CodeRouter. Results depend on your mix of tasks and your cache hit rate; your dashboard shows your own cost per request.
| # | Model | Cache-Read | Cost |
|---|---|---|---|
| 1 | kimi-k2.6 | 0 | 0.007560 |
| 2 | kimi-k2.6 | 9728 | 0.002720 |
| # tests failed → stronger model | |||
| 3 | claude-sonnet-5.5 | 0 | 0.025900 |
| 4 | claude-sonnet-5.5 | 11136 | 0.005110 |
| # same model, cache warm again | |||
How a request is routed
CodeRouter starts each request on the cheapest model that can handle the task and moves up only when tests or errors show a failure or the agent stalls. A coding-agent session stays on one model, so the prompt cache stays warm. We keep optimizing our routing strategies and algorithms.
Three steps, about two minutes.
If your tool speaks the OpenAI or Anthropic API, it works with CodeRouter.
- 01
Create a key
Sign in with Google and create a cr_ key in the dashboard. The full key is shown once; we store only a hash.
Create a free key - 02
Point your tool at CodeRouter
Claude Code: run the one-line setup. Cursor, Aider, Cline, Continue.dev and the OpenAI SDK: set the base URL to https://www.coderouter.io/api/v1 and paste the key.
- 03
Use model auto
Every response carries X-CodeRouter-* headers with the model and cost, and the dashboard shows each request's cost.
Measured, not estimated.
TokenWatt, a measurement project from the same team as CodeRouter, runs 176 single-file Python tasks (Exercism and Aider's polyglot hard set). The model gets the instructions and a stub and returns the file; the tests run; on a failure it gets one retry with the failing test output. Costs are at list price.
| Configuration | Solved | First try | Cost | vs all-Opus |
|---|---|---|---|---|
| All requests to Claude Opus 5.5 | 176/176 | — | $2.56 | 100% |
| Routing v3, first run (2026-11-04) | 176/176 | 88.6% | $0.77 | 30% · 70% less |
| Earlier router, three runs (Oct 2026) | 96.0–97.7% | — | — | 41–44% · 56–59% less |
One balance for the team. Budgets per developer.
$19 per developer per month. All model usage is billed from a prepaid team balance at list price, with no markup; a 5.5% payment fee applies to top-ups.
Per-seat price
A seat is an active team member; changes are prorated. Top-ups from $100 by card or US bank transfer (ACH), with optional auto top-up.
Budgets and alerts
Per member, per project and company-wide. Email alert at 80%; at 100%, downgrade to cheaper models or pause — a team setting. The company cap always blocks.
Spend per developer
One key per engineer; spend by member and project. Up to 50 API keys and 2,400 requests per minute.
No prompts for admins
Admins see spend and metadata, never prompts or responses, and can turn request-content storage off.
Setup guides for the tools you already use.
Claude Code talks to the Anthropic-compatible endpoint; the others use the OpenAI-compatible base URL. Each card links to the exact configuration.
One price: model list price, no markup.
Pay as you go from a prepaid balance with no monthly fee — smart routing or Direct mode, your choice. Team adds budgets and per-member spend for $19 per developer.
| Option | Monthly fee | Model usage | What you get |
|---|---|---|---|
| Free start | $0 | $1 over 7 days with no card; $5 once you add a card (not charged) | Every model except Claude Opus; then pay as you go |
| Pay as you go | None | List price, no markup, from a prepaid balance; 5.5% payment fee on top-ups | Smart routing or Direct mode; top-ups from $20 |
| Team | $19/developer/mo | List price, no markup, from a team balance; 5.5% payment fee on top-ups | Budgets and spend per member and project; top-ups from $100 |
Questions developers ask first.
Does CodeRouter still use Opus?
Yes, on a paid balance (pay as you go and Team). Each task starts on the cheapest model that can handle it and moves up only when tests or errors show a failure or the agent stalls, up to Claude Opus 5.5 for the hardest work. Everyday edits, implementation and tests run on Claude Haiku 5.5, Kimi K2.6 or Claude Sonnet 5.5.
Can I pick the model myself?
Yes. Smart routing is the default: every request is routed and an explicit model name is ignored. Switch to Direct mode in the dashboard and CodeRouter uses the exact model you name, at the same list price with no markup. You can switch back at any time.
How do I see what each request cost?
Every response carries X-CodeRouter-Model and X-CodeRouter-Cost headers, and the dashboard lists each request. X-CodeRouter-Cost-If-Opus prices the same tokens at Opus list price — a same-token estimate. In a coding-agent session a stronger model takes a different number of steps, so it isn't what an all-Opus session would have cost; those requests carry no X-CodeRouter-Savings.
What happens when my balance runs out?
Requests stop: the API returns HTTP 402 with a link to add balance, so you're never billed beyond what you topped up. Turn on auto top-up to refill automatically, or BYOK fallback to continue on your own provider keys. Team has budgets per member and project on top.
What do you store?
To improve routing we keep, for up to 180 days, an excerpt of each request (the latest message and the start and end of the latest tool output), a short response summary and the routing decision. The subprocessor that runs our routing decisions receives the excerpt and states it does not train on customer data. Team admins can turn content storage off. API keys are stored only as a hash. Data is never sold.
How is this different from OpenRouter?
OpenRouter is a general gateway to hundreds of models; its Auto Router and Auto Code (a router for coding agents, launched November 2026) use a decision model to pick a model for each request. CodeRouter is built only for coding agents: it starts each task on the cheapest model that can handle it, moves up only when tests or errors show a failure or the agent stalls, and keeps a session on one model so the prompt cache stays warm. Full comparison
Try it on your own workload.
$1 of free usage over 7 days with no card, $5 once you add one (it isn't charged). Your dashboard shows the cost of every request.
Start free trialGet weekly AI cost optimization tips
Join developers cutting their agent bills