Get CodeRouter running with your AI agent in under 60 seconds.
All paid plans use system provider keys; the Free Trial gives you 1M tokens (over 2 days) to evaluate routing quality.
Sign in with Google, then create a key in the dashboard. Name it after the engineer or workflow (e.g. alice, ci, prod) so per-key analytics make sense later.
One-line setup script that detects your installed agent (OpenClaw, Cursor, Aider, Claude Code) and writes the right config:
export ANTHROPIC_BASE_URL=https://www.coderouter.io/api/v1 export ANTHROPIC_AUTH_TOKEN=cr_YOUR_KEY_HERE export ANTHROPIC_MODEL=auto export ANTHROPIC_DEFAULT_OPUS_MODEL=auto export ANTHROPIC_DEFAULT_SONNET_MODEL=auto export ANTHROPIC_DEFAULT_HAIKU_MODEL=auto # Optional v2.x fix: disable experimental beta features that # some third-party gateways don't yet handle. export CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1 claude
{
"env": {
"ANTHROPIC_BASE_URL": "https://www.coderouter.io/api/v1",
"ANTHROPIC_AUTH_TOKEN": "cr_YOUR_KEY_HERE",
"ANTHROPIC_MODEL": "auto",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "auto",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "auto",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "auto",
"CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1"
}
}Need a different agent (Cline, Windsurf, GitHub Copilot via LiteLLM)? See full integration docs.
Test routing without burning tokens — X-Dry-Run returns the routing decision (model, phase, cost estimate) without calling the provider:
curl https://www.coderouter.io/api/v1/chat/completions \
-H "Authorization: Bearer cr_YOUR_KEY" \
-H "Content-Type: application/json" \
-H "X-Dry-Run: true" \
-d '{"model":"auto","messages":[{"role":"user","content":"Hello"}]}'Response should include the chosen model and phase. Drop X-Dry-Run for a real call.