Skip to content
All posts

Claude Code on anyrouter.dev

Claude Code on anyrouter.dev. cli.sh then anyr claude. ANTHROPIC_BASE_URL=https://anyrouter.dev/api. Free has no monthly credits; Go is $2/mo ($2.63 charged) → $4.

Point Claude Code at anyrouter.dev

Claude Code on this product is anyrouter.dev.

The Anthropic-compatible base URL is https://anyrouter.dev/api (no /v1 on that env var. Claude Code appends /v1/messages). The OpenAI-compatible API is https://anyrouter.dev/api/v1.

Fast path: cli.sh + anyr claude

terminal
curl -fsSL https://anyr.dev/cli.sh | bash
anyr login
anyr claude

Full reference: anyrouter.dev/docs/cli/claude-code.

Manual env (only if you skip anyr)

Claude Code on anyrouter.dev
export ANTHROPIC_BASE_URL="https://anyrouter.dev/api"
export ANTHROPIC_API_KEY="sk-ar-your-key"
claude

Create the key in the dashboard first. Every AnyRouter key starts with sk-ar-.

BYOK and anyr

Attach your own provider keys under Dashboard → BYOK. BYOK traffic has no AnyRouter markup. anyr claude still talks to https://anyrouter.dev/api.

To get Go without a card, donate an eligible BYOK key.

Free has no monthly credits

The Free plan includes no monthly credits. Free callers get a 5-request lifetime trial on anyrouter/free and :free models; after that they need Go or higher, with no daily cap. Paid models return 402 without credits or a subscription.

Go is $2/mo (Polar charges $2.63) → $4 credits. Or donate an eligible BYOK key.

Go rate limits: 60 req/min and 3,000 req per rolling 5 hours. Older posts that say $1 Go are wrong, see Free vs Go.

Related posts