Claude Code
Claude Code is Anthropic’s
CLI agent. It expects an Anthropic API endpoint, which LowRouter
exposes via the /api/v1/anthropic prefix.
Configure
Set environment variables before starting Claude Code:
Bash
export ANTHROPIC_BASE_URL=https://lowrouter.ai/api/v1/anthropic
export ANTHROPIC_API_KEY=lr-sk-...
claudeOr persist them in your shell profile (~/.zshrc, ~/.bashrc).
Picking a model
Claude Code uses the model defined in its settings. Edit
~/.claude/settings.json to pin a LowRouter-routed Claude model:
JSON
{
"model": "anthropic/claude-sonnet-4-5"
}The model string is the LowRouter ID (anthropic/claude-sonnet-4-5),
not Anthropic’s short name. The full list of supported Claude models
is on the model browser — filter by provider anthropic.
Recommended setup
- Dedicated key. Same daily-limit advice as the other agents.
- EU residency: pin the key’s region to
eu-westso Claude requests are served from EU endpoints. This survives IDE restarts and machine swaps without per-session config. - Audit usage on the dashboard. The transaction detail page shows token counts and cost per generation, which Claude Code itself does not surface in real time.
Troubleshooting
- Claude Code can’t reach the API: the base URL must end with
/anthropic(no trailing slash). Claude Code appends/v1/messagesinternally. - Model “not found”: confirm the model exists on the model browser. Anthropic adds and deprecates models faster than the model browser updates; a 404 usually means the model is no longer routable.
- The agent stalls during streaming: this is sometimes a
network-buffering issue between Claude Code and LowRouter. Setting
CLAUDE_CODE_STREAM_BUFFER=0(if the version you run supports it) disables the client-side buffer.