Use Claude Code with KeepRouter
Claude Code sends Anthropic Messages requests. Set ANTHROPIC_BASE_URL to KeepRouter and use a compatible chat model from the production catalog. Each model page lists the current customer price and supported endpoint.
Setup (two lines)
Point Claude Code at KeepRouter with two environment variables:
export ANTHROPIC_BASE_URL=https://keeprouter.com
export ANTHROPIC_AUTH_TOKEN=sk-kr-your-keyOr add them to ~/.claude/settings.json:
{
"env": {
"ANTHROPIC_BASE_URL": "https://keeprouter.com",
"ANTHROPIC_AUTH_TOKEN": "sk-kr-your-key"
}
}Then run claude as usual. KeepRouter presents an Anthropic-compatible Messages surface; streaming and tool-use events are passed through or translated internally according to the selected upstream route.
Choose a model ID
Switch models inside Claude Code with /model <id>. The rows below are compatible catalog examples, not recommendations:
| Model | Maker | Published price |
|---|---|---|
claude-opus-4-8 | Anthropic | $5.00 per 1M input tokens and $25.00 per 1M output tokens |
claude-sonnet-4-6 | Anthropic | $3.00 per 1M input tokens and $15.00 per 1M output tokens |
claude-haiku-4-5 | Anthropic | $1.00 per 1M input tokens and $5.00 per 1M output tokens |
glm-4.6 | Zhipu AI | $0.6000 per 1M input tokens and $2.20 per 1M output tokens |
kimi-k2.6 | Moonshot AI | $0.6800 per 1M input tokens and $3.41 per 1M output tokens |
deepseek-v4-pro | DeepSeek | $0.4350 per 1M input tokens and $0.8700 per 1M output tokens |
free | — | $0 (free) |
See the full list on Models & pricing.
Manage spend per turn
Each turn is charged from its actual input and output token counts and the selected model's current published rates. Repository context and response length vary, so this page does not preserve a fixed per-turn estimate.
Compare current availability, endpoint compatibility and rates in the live catalog before choosing which model handles each kind of turn. Billing is prepaid and pay as you go, with no monthly subscription.
Frequently asked questions
Does tool use / function calling work?
On compatible chat routes, KeepRouter accepts the Anthropic tool-use shape and either passes it through or translates it; support depends on the selected model and active route.
Does streaming work?
Streaming is available when the selected compatible chat model and active route support it.
Can I switch models mid-session?
Yes — /model <id> in Claude Code.
Do I need a separate Anthropic account?
No. One KeepRouter key (sk-kr-…) authenticates requests for compatible chat models available to your account.
Is it only for Claude models?
No. The Messages-compatible route can serve non-Claude chat models that have a compatible configured channel. Image, embedding, audio, and other specialized models use their own endpoints.