What you need
AnyRouter's API is just HTTPS. Any environment that can run curl or a Python/Node.js script can use it — no special client, no OS-specific binaries, no root access.
You need:
- An AnyRouter account and API key (free to create at anyrouter.dev)
- curl, Python, Node.js, or any HTTP client
- Outbound HTTPS access to anyrouter.dev
Quick test from the terminal
Verify connectivity with a single curl command:
curl -s https://anyrouter.dev/api/v1/chat/completions \
-H "Authorization: Bearer sk-ar-v1-placeholder" \
-H "Content-Type: application/json" \
-d '{"model":"anyrouter/free","messages":[{"role":"user","content":"Say hi"}]}'If you get a JSON response with choices, you're connected. A 401 means the key is wrong; a network timeout means outbound HTTPS is blocked.
Common environment gotchas
- HTTPS proxy — if you're behind a corporate proxy, set HTTPS_PROXY so curl and your SDK can reach anyrouter.dev.
- Firewall rules — confirm outbound 443 is open on headless servers and CI runners.
- TLS certificates — some minimal Docker images don't ship CA certs. Install ca-certificates if you see SSL errors.
- Clock skew — if your server clock is off by more than a few minutes, TLS handshakes can fail. Sync with NTP.
Using from scripts and CI
Store your key as an environment variable. Don't hardcode it in scripts that go into version control:
export ANYROUTER_API_KEY="sk-ar-v1-..."
# Then in Python:
# base_url="https://anyrouter.dev/api/v1"
# Or Node.js:
# baseURL: "https://anyrouter.dev/api/v1"CI platforms (GitHub Actions, GitLab CI, etc.) all support encrypted secrets — store the key there and reference it as an env var in your workflow.
AnyRouter status and reliability
For the current status of anyrouter.dev, check the system status page or try the health endpoint. If you're seeing intermittent failures, the fallover routing usually resolves them without code changes.
Track request-level health, latency, and error rates per model at chmonitor.dev.
Works from Linux, WSL, CI, or any HTTPS-capable environment. Sign up free.
Get startedRelated posts
Free LLM API access for students and side projects
You don't need a company card to build with real models. Between a no-spend free tier, a $2/mo plan if you outgrow it, and routing on free-tier keys you may already have from providers like Google AI Studio, there's a durable way to stay at $0 while a class project or side hustle is still finding its shape.
Run Claude Code on AnyRouter — wrapper script or CLI
Route Claude Code through AnyRouter in two ways: a wrapper that installs itself and maps Opus, Sonnet, and Haiku to one catalog model (override with --model), or the anyr CLI launcher. One key, unified billing, audit logs.