Script wrapper (ar_claude)
Một lệnh tải wrapper, cài vào ~/.local/bin/ar_claude, đánh dấu executable, rồi chạy 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"Script: Unix tại /ar_claude.sh, Windows tại
Xem script PowerShellSau khi cài, chọn bất kỳ model catalog. Alias Opus, Sonnet, và Haiku đều trỏ cùng 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"
Launcher CLI
Hoặc CLI lo login và config trong một lệnh:
curl -fsSL https://anyrouter.dev/setup.sh | bash
anyr login
anyr claude
anyr claude --model "z-ai/glm-4.7"
anyr claude --dry-runTham chiếu đầy đủ tại docs.anyrouter.dev/cli/claude-code.
Đi tiếp từ đây
Cùng pattern cho Codex, Cursor, và mọi agent tương thích OpenAI. Một key phủ mọi tool bạn chạy.
Thêm tại docs.anyrouter.dev.
Bài liên quan
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.
Gửi request đầu trong hai phút
Bắt đầu miễn phí với key của bạn, hoặc nạp rồi trả theo token. Go: $4 credit/tháng — $2/tháng, hoặc miễn phí khi góp một provider key.
Bắt đầu miễn phí