Skip to content
All use cases
One gateway

Run every coding agent through one URL

Claude Code, Codex, OpenCode, Cursor, and other OpenAI-compatible tools share 209+ models, one balance, and one request log.

01

The problem

What this is for

Each coding agent wants its own provider key and base URL. Switching models or comparing cost means editing every tool separately.

02

What to do

Three steps, then copy

  1. 1.Mint one AnyRouter key.
  2. 2.Set Anthropic env vars for Claude Code, and OpenAI env vars for Codex, Cursor, and similar tools.
  3. 3.Start on anyrouter/auto so failover picks a model that is answering.
Claude Code
bash
export ANTHROPIC_BASE_URL="https://anyrouter.dev/api"
export ANTHROPIC_API_KEY="$ANYROUTER_API_KEY"
Codex / Cursor
bash
export OPENAI_BASE_URL="https://anyrouter.dev/api/v1"
export OPENAI_API_KEY="$ANYROUTER_API_KEY"
OpenCode
bash
anyr opencode

Ready to try it

The guide has the full walkthrough. Sign up if you still need a key.