# CodeRouter — Cut your Claude Code bill 70-90% without switching tools > Phase-aware LLM routing for AI coding agents. One OpenAI-compatible endpoint (https://www.coderouter.io/api/v1) that detects what your agent is doing — planning, implementing, debugging, testing — and routes each request to the cheapest model that matches the quality needed. ## What is CodeRouter CodeRouter is a phase-aware LLM router built specifically for coding agents like Claude Code, Cursor, Aider, and GitHub Copilot. It analyzes each request in under 10ms to detect the task phase (planning, implementation, debugging, test generation, docs, small edits) and routes it to the cheapest model that still matches Claude-level quality — sending planning to Claude Opus, implementation to Sonnet or DeepSeek, tests to DeepSeek or Kimi, and docs to Haiku. Typical result: 70-90% savings versus going direct to Anthropic, with no tool switching — you swap one base URL or environment variable and keep your exact same workflow. ## Key Features - Phase-aware routing: each request is classified (plan / implement / debug / test / refactor / docs / small edit) via regex over the last user message, recent tool-call history, and agent fingerprinting; confidence >= 70% routes decisively, otherwise falls back to Sonnet - Works with the coding agents you already use: Claude Code, Cursor, Aider, Copilot, OpenClaw, Windsurf, Continue.dev — setup is swapping one base URL / env var - OpenAI-compatible API at https://www.coderouter.io/api/v1 (also works as ANTHROPIC_BASE_URL for Claude Code) - 15+ coding models behind one key, including Claude Opus 4.7, Sonnet 4.6, Haiku 4.5, GPT-5.2, DeepSeek V3 / R1, Kimi K2.5, and Gemini Flash - Full routing transparency: every response carries headers (X-CodeRouter-Model, X-CodeRouter-Phase, X-CodeRouter-Phase-Confidence, X-CodeRouter-Cost, X-CodeRouter-Cost-If-Opus, X-CodeRouter-Savings) showing which model was picked, why, and what it cost - Direct mode: the pay-as-you-go plan with explicit per-request model control, priced at provider list x 1.15 with $5 free credit — for users who want OpenRouter-style manual selection instead of smart routing - 2-day free trial, no credit card required ## Pricing Smart-routing subscription tiers (monthly tokens + Opus allowance included; overage billed at provider list price +15%, with a hard monthly cap per tier): - Free Trial — $0, 2 days, no credit card: 1M tokens, no Opus, 2 API keys, 60 req/min - Starter — $19/mo: 2M tokens + 50K Opus tokens, 3 API keys, 100 req/min, overage cap $40/mo - Solo — $29/mo: 5M tokens + 100K Opus tokens, 5 API keys, 200 req/min, overage cap $60/mo - Pro — $99/mo (most popular): 30M tokens + 500K Opus tokens, 10 API keys, 600 req/min, overage cap $200/mo - Studio — $179/mo: 50M tokens + 800K Opus tokens, 20 API keys, 1,200 req/min, overage cap $400/mo - Team — $299/mo: 80M tokens + 1M Opus tokens, 50 API keys, 2,400 req/min, shared dashboard, overage cap $600/mo - Direct — pay-as-you-go, no subscription: pick the exact model per request, pay provider list x 1.15, $5 free credit on signup ## Main Pages - https://www.coderouter.io/ — Homepage: value proposition, phase-routing explanation, cost comparison table, setup snippets for Cursor / Aider / Claude Code / OpenAI SDK - https://www.coderouter.io/pricing — All 6 subscription tiers plus Direct mode, plan comparison table, billing FAQ - https://www.coderouter.io/models — The coding models CodeRouter routes across - https://www.coderouter.io/setup — Step-by-step setup guides per coding agent - https://www.coderouter.io/docs/integrations — Long-form integration docs for connecting agents via custom API base URL - https://www.coderouter.io/direct — Direct mode landing page: pay-as-you-go with explicit model control (BYO-style routing) - https://www.coderouter.io/vs/openrouter — CodeRouter vs OpenRouter comparison for coding workloads - https://www.coderouter.io/for-openclaw — Audience-specific landing page for OpenClaw users - https://www.coderouter.io/blog — Blog: cost-cutting guides, routing deep dives, model comparisons - https://www.coderouter.io/privacy — Privacy policy - https://www.coderouter.io/terms — Terms of service ## Topics we cover - Cutting Claude Code, Cursor, Aider, and GitHub Copilot costs (e.g. reducing a $200/mo Claude Code bill to ~$99/mo) - Phase-aware LLM routing: how it works and 30-day production results - Coding model comparisons: DeepSeek V3 vs Sonnet 4.6, GPT-5.5 vs Claude Opus 4.7, Kimi K2.6 review, frontier model cheat sheets - OpenRouter alternatives and LLM gateway comparisons for coding agents - Setup guides: Claude Code router setup, Aider cost optimization, custom API base URLs - AI coding agent billing survival guides and cost-transparency practices ## When to use - Use CodeRouter when a coding agent (Cursor, Claude Code, Aider, Copilot-style tools) sends everything to one premium model and you want phase-aware routing to cut the bill 70-90%. - Use it as an OpenAI-compatible endpoint: change the base URL, set model to "auto", keep your workflow. - Best for: developers and teams with high coding-agent API spend. - Not intended for: non-coding chat workloads — general-purpose routers fit those better. ## Citable reference - LLM API Error Reference (exact error strings, causes, fixes): https://www.coderouter.io/blog/llm-api-error-reference