Claude Code is Anthropic’s terminal agent. It expects Anthropic-shaped endpoints by default. PointDocumentation Index
Fetch the complete documentation index at: https://docs.routing.run/llms.txt
Use this file to discover all available pages before exploring further.
ANTHROPIC_BASE_URL at the routing.run host, authenticate with ANTHROPIC_API_KEY, and use route/... model ids.
Official references:
Setup
Get your API key
Create an API key at app.routing.run. Copy the key. It starts with
rk_.Set environment variables
Copy the Connection prompt block below into your shell profile or run the exports in each terminal session before
claude.Connection prompt
Copy this into your terminal notes, team wiki, or any assistant that is helping you wire up Claude Code. It includes the full setup sequence, not just the env vars.Claude Code CLI - connect to routing.run
Manual configuration
If you want to configure Claude Code manually instead of using the prompt above, export these exact values before you runclaude:
routing.run so switching providers is simpler.
Use a model id with the route/ prefix when you select or override models. Pin all Claude Code alias model variables to routing.run model IDs too. Otherwise Claude Code may still use a built-in Anthropic model such as claude-haiku-4-5-20251001 for background tasks, which routing.run will reject.
Claude Code also documents settings files at ~/.claude/settings.json, .claude/settings.json, and .claude/settings.local.json. The documented knobs include env and apiKeyHelper, but the core routing.run connection is still ANTHROPIC_BASE_URL plus ANTHROPIC_API_KEY.
A minimal ~/.claude/settings.json example:
Add the exports to
~/.bashrc or ~/.zshrc, or load them from a secrets manager in CI.Claude Code does not have a general OpenAI-compatible provider mode. It expects Anthropic semantics. Point it at
https://api.routing.run, not https://api.routing.run/v1, because Claude Code appends /v1/messages itself.For coding agents in general, routing.run recommends
/v1/chat/completions. Claude Code is the exception because it requires Anthropic-style requests.Recommended models
Published model IDs are listed on the models page. Exact access depends on your plan tier and the dashboard; common picks:| Model | Use case |
|---|---|
route/deepseek-v4-pro-precision | Best current Claude Code starting point |
route/deepseek-v4-pro | Lower-cost DeepSeek V4 option |
route/glm-5.1-precision | Strong reasoning alternative |
route/qwen3.6-plus | Qwen option if your workflow is compatible |
route/minimax-m2.7 | Long-context sessions |
route/kimi-k2.6-precision | Agentic and tool-heavy flows |