Claude Code
Run Anthropic's Claude Code against LiteRouter using its native Messages endpoint.
Claude Code talks the Anthropic Messages API, which LiteRouter serves at /v1/messages. Point it there with three environment variables, then pick a Claude model.
Configure
Set these in your shell (or your ~/.zshrc / ~/.bashrc to make them permanent):
bash
export ANTHROPIC_BASE_URL="https://api.literouter.com"
export ANTHROPIC_AUTH_TOKEN="your_literouter_api_key"
export ANTHROPIC_MODEL="claude-sonnet-4.6:metered"
Run it
bash
claude
⚠
The Messages endpoint only accepts Claude models. Set ANTHROPIC_MODEL to a Claude ID such as claude-sonnet-4.6:metered or claude-opus-4.8:metered. Browse them in the Models section.
💡
Claude models need a paid plan that includes them. Check your plan on the pricing page.