Wrapper script (ar_claude)
One command downloads the wrapper, installs it to ~/.local/bin/ar_claude, marks it executable, and runs Claude Code:
export ANYROUTER_API_KEY="sk-ar-..."
curl -sL https://anyrouter.dev/ar_claude.sh | bash -s -- "explain this project"$env:ANYROUTER_API_KEY = "sk-ar-..."
irm https://anyrouter.dev/ar_claude.ps1 -OutFile "$env:USERPROFILE\.local\bin\ar_claude.ps1"
& "$env:USERPROFILE\.local\bin\ar_claude.ps1" "explain this project"Scripts: Unix at /ar_claude.sh, Windows at
View PowerShell scriptAfter install, pick any catalog model. Opus, Sonnet, and Haiku aliases all point at that same id:
export ANYROUTER_API_KEY="sk-ar-..."
ar_claude --model poolside/laguna-s-2.1 "Explain the architecture of this project"
ar_claude --model z-ai/glm-4.7 "Review this PR"
CLI launcher
Alternatively, the CLI handles login and config in one command:
curl -fsSL https://anyrouter.dev/setup.sh | bash
anyr login
anyr claude
anyr claude --model "z-ai/glm-4.7"
anyr claude --dry-runFull reference at docs.anyrouter.dev/cli/claude-code.
Where to go from here
The same patterns work for Codex, Cursor, and every OpenAI-compatible agent. One key covers every tool you run.
More at docs.anyrouter.dev.
Related posts
Use OpenCode with AnyRouter — CLI launcher or opencode.json
Point the OpenCode coding agent at AnyRouter in one command, or add a custom Chat Completions provider in opencode.json. One sk-ar- key reaches every catalog model, with unified billing and request logs.
Point Claude Code at a custom base URL
Claude Code reads ANTHROPIC_BASE_URL and ANTHROPIC_API_KEY, so pointing it at AnyRouter takes two environment variables — no plugin, no fork. You get every model in the catalog behind the same key, automatic failover when a provider is rate-limited, and one audit log shared with Codex, Cursor, and every other agent you run.
Route your first request in 2 minutes
Start free with your own keys, or top up and pay per token. Get $4/mo in credits and free models on Go — $2/mo, or free when you donate a provider key.
Start free