Skip to content
All use cases

Codex

Run Codex through AnyRouter

anyr codex signs you in, stores one sk-ar- key, and launches Codex against AnyRouter's OpenAI-compatible endpoint.

What this is for

Codex expects an OpenAI key and base URL. Using other models or one balance across tools means editing its environment by hand.

Steps, then copy

  1. 1.Install the anyr CLI.
  2. 2.Run anyr codex. First run signs you in or pastes an sk-ar- key.
  3. 3.Pin a model or effort with --model and --effort. Anything after -- goes to Codex.
anyr CLI
bash
curl -fsSL https://anyrouter.dev/setup.sh | bash
anyr codex
Env wrapper
bash
export OPENAI_BASE_URL="https://anyrouter.dev/api/v1"
export OPENAI_API_KEY="$ANYROUTER_API_KEY"

Ready to try it

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