// CLI Agent
Use Claude Code with llmrelay
Anthropic's official terminal agent — pointable at any Anthropic-compatible endpoint. Point it at api.llmrelay.dev and get the same models at half the price.
Recommended model
claude-opus-4-7
Route
anthropic-compatible
On llmrelay
$2.5/M · $12.5/M
Setup
- 1 npm install -g @anthropic-ai/claude-code
- 2 export ANTHROPIC_BASE_URL=https://api.llmrelay.dev
- 3 export ANTHROPIC_AUTH_TOKEN=sk-llmrelay-...
- 4 claude
Config
# add to your shell rc (.zshrc / .bashrc) export ANTHROPIC_BASE_URL="https://api.llmrelay.dev" export ANTHROPIC_AUTH_TOKEN="sk-llmrelay-..."
Smoke test
Copy, paste, run. If you get JSON back with a message, you're good.
claude --print "say hi in one word"
Gotchas
- !ANTHROPIC_AUTH_TOKEN, not ANTHROPIC_API_KEY — Claude Code uses a different env var when routing through custom endpoints.
- !Claude Code will still show anthropic.com in help text; that's cosmetic. Your traffic goes to llmrelay.
You need an llmrelay key first
Sign up in about 30 seconds. New accounts get $0.20 in free credit — enough to smoke-test every model.