CodeRouter is a phase-aware API proxy that detects whether your request is planning, implementing, debugging, or testing — and routes it to the cheapest model that can actually do the job. Typical developers cut their coding-agent bill by 70–90% in the first week.
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.
# In Cursor settings → Models → Custom API Base URL: https://coderouter.io/api/v1 API Key: cr_your_coderouter_key Model: auto
Every response carries headers explaining exactly which model we picked, why, and how much it cost. No black box.
Plus 20% markup on any overage — never inflated, with a per-plan cap so you never see a runaway bill.
14-day free trial, no credit card. 2-minute setup. Typical devs see 70–90% cost reduction in the first week.
Start free trial →