Built for devs using Cursor · Aider · Claude Code · Copilot · OpenClaw

Your coding agent doesn't need
Opus for everything.

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.

✓ No credit card to trial✓ 2-minute setup✓ Works with any OpenAI-compatible agent
Works with your coding agent
CursorAiderClaude CodeCopilotOpenClawWindsurfContinue.dev

Right now, every "fix this typo" costs Opus prices.

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.

Phase
All-Opus cost
Smart model
Smart cost
Planning (5% of calls)
$33/M
Claude Opus 4.7
$33/M
Implementation (55%)
$33/M
DeepSeek V3 / Sonnet 4.6
$1.26/M
Debugging (10%)
$33/M
Sonnet 4.6 / R1
$3.46/M
Test generation (15%)
$33/M
DeepSeek V3
$0.32/M
Small edits + docs (15%)
$33/M
Haiku 4.5 / Gemini Flash
$1.25/M
Blended average
$33/M
(weighted mix)
~$2.30/M

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.

We analyze each request in <10ms and route it.

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.

Plan

Architecture & design

"How should I structure this service? What's the best caching strategy?" — high reasoning, low frequency.

→ Claude Opus 4.7 / GPT-5.2
Implement

Code generation

"Write a function that..." "Add error handling to this." The bulk of your agent's work — 50–60% of calls.

→ Sonnet 4.6 / DeepSeek V3
Debug

Errors & failures

Tool result contained a stack trace? Failed test? We know — route to reasoning-strong models.

→ Sonnet 4.6 / DeepSeek R1
Test

Test generation

Writing unit/integration tests is pattern-heavy. Cheap models do this as well as premium — for 100× less cost.

→ DeepSeek V3 / Kimi K2.5
Refactor

Restructuring

"Extract this into a helper", "simplify this method" — medium reasoning, high frequency.

→ Sonnet 4.6 / DeepSeek V3
Document

Docstrings & READMEs

Template-heavy, low reasoning — prime Haiku/Flash territory.

→ Haiku 4.5 / Gemini Flash
Small edit

Formatting & renames

"Fix the typo on line 42." Using Opus for this is criminal. We route to the cheapest capable model.

→ GPT-5 Mini / Flash
Fallback

Uncertain requests

Low-confidence phase? We stay conservative — upgrade to a tier-1 model rather than guess wrong.

→ Sonnet 4.6 default

Change one 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

We show you every routing decision.

Every response carries headers explaining exactly which model we picked, why, and how much it cost. No black box.

X-CodeRouter-Model: deepseek-chat
X-CodeRouter-Phase: implement
X-CodeRouter-Phase-Confidence: 0.85
X-CodeRouter-Agent: cursor
X-CodeRouter-Cost: 0.000123
X-CodeRouter-Cost-If-Opus: 0.012874
X-CodeRouter-Savings: 99.0%

Simple platform pricing.

Plus 20% markup on any overage — never inflated, with a per-plan cap so you never see a runaway bill.

Solo
$29 /mo
  • 5M tokens + 100K Opus included
  • Phase-aware routing
  • All 15+ coding models
  • +20% overage (cap $60/mo)
Start Solo
Team
$299 /mo
  • 80M tokens + 1M Opus included
  • 5 seats + shared dashboards
  • SSO-ready
  • +20% overage (cap $600/mo)
Start Team
See all 6 plans + FAQ →

Stop paying Opus prices
for variable renames.

14-day free trial, no credit card. 2-minute setup. Typical devs see 70–90% cost reduction in the first week.

Start free trial →