Run Claude Code on free models
Point Claude Code at anyrouter/free and it codes on whichever free model is answering, with no credit deduction.
The problem
What this is for
Trying a coding agent on a hobby repo should not need a paid plan with one vendor. You want a free model that fails over, and a clear daily cap.
What to do
Three steps, then copy
- 1.Install the anyr CLI and sign in. Upgrade to Go ($2/mo) or donate a key to raise the free cap to 1,000 requests/day.
- 2.Run anyr claude --model anyrouter/free. Requests do not deduct credits.
- 3.Run anyr models to list catalog ids, and switch to anyrouter/auto or a pinned model when a task needs more.
curl -fsSL https://anyrouter.dev/setup.sh | bash
anyr claude --model anyrouter/freeexport ANTHROPIC_BASE_URL="https://anyrouter.dev/api"
export ANTHROPIC_API_KEY="$ANYROUTER_API_KEY"
claude --model anyrouter/freeReady to try it
The guide has the full walkthrough. Sign up if you still need a key.
Related
Next playbooks
Run Claude Code through AnyRouter
Install the anyr CLI, then anyr claude — it injects the base URL, key, and model. Env vars are the fallback if you already run claude yourself.
OpenUnlock the free pool for $2 a month
The Go plan is $2/mo and raises free-tier access to 1,000 requests a day. Cancel any time. Donating a provider key can unlock Go without paying.
OpenStart on anyrouter/free or anyrouter/auto
Two built-in virtual models: Go+ free failover (anyrouter/free) and stable paid failover (anyrouter/auto). Do not pick a flaky SKU for your first request.
Open