Your agent sends planning calls, implementation calls, debugging calls, small edits. CodeRouter detects each phase and routes to the cheapest model that still matches Claude's quality — typical 70–90% savings vs direct Anthropic.
Same OpenAI-compatible API. But instead of making you pick a model manually for every request, CodeRouter detects what phase of coding your agent is in — planning, implementation, debugging, test generation — and picks the cheapest model that can actually handle it.
Plug CodeRouter into your existing Claude Code setup. Keep the exact same CLI, get the same quality output, pay 70-90% less. Bring your own Anthropic or OpenAI keys — or use ours.
Coding agents default to a single premium model — Claude Opus 4.7 at $15/$75 per 1M tokens. They use it for architecture decisions AND for // TODO: rename variable. That's why your bill balloons.
Math based on typical coding-agent workload mix (70% input / 30% output tokens). Real savings depend on your workload — the CodeRouter dashboard shows your actual number per week.
Phase detection is built from regex over the last user message + inspection of recent tool-call history + agent fingerprinting (we know Cursor composer mode, Aider architect mode, Claude Code plan mode, etc). Confidence ≥ 70% → route decisively.
"How should I structure this service? What's the best caching strategy?" — high reasoning, low frequency.
"Write a function that..." "Add error handling to this." The bulk of your agent's work — 50–60% of calls.
Tool result contained a stack trace? Failed test? We know — route to reasoning-strong models.
Writing unit/integration tests is pattern-heavy. Cheap models do this as well as premium — for 100× less cost.
"Extract this into a helper", "simplify this method" — medium reasoning, high frequency.
Template-heavy, low reasoning — prime Haiku/Flash territory.
"Fix the typo on line 42." Using Opus for this is criminal. We route to the cheapest capable model.
Low-confidence phase? We stay conservative — upgrade to a tier-1 model rather than guess wrong.
base_url. That's it.If your agent speaks the OpenAI chat-completions API, it speaks CodeRouter. Cursor, Aider, Claude Code, Copilot, OpenClaw, Windsurf, or your own SDK.
# Cursor → Settings → Models 1. Find "OpenAI API Key" section, toggle: "Override OpenAI Base URL" → ON URL: https://www.coderouter.io/api/v1 Key: cr_your_coderouter_key 2. Click Verify (must be green) 3. Scroll up to "Models" → "+ Add custom model" Name: auto 4. Tick the auto checkbox to enable it, then pick "auto" in the chat model dropdown.
Every response carries headers explaining exactly which model we picked, why, and how much it cost. No black box.
Cut my $400/mo Claude Code bill to $60 just by pointing it at CodeRouter. Same output quality.
Same quality output, 80% cheaper. Team of five switched over a weekend — zero code changes.
Plus 15% markup over provider list price on any overage — verifiable on each provider's pricing page, with a per-plan cap so you never see a runaway bill.
2-day free trial, no credit card. 2-minute setup. Typical devs see 70–90% cost reduction in the first week.
Start free trial →