CodexCoding agents
Run Codex through AnyRouter
anyr codex signs you in, stores one sk-ar- key, and launches Codex against AnyRouter's OpenAI-compatible endpoint.
Set it up
anyr CLI
$ curl -fsSL https://anyr.dev/cli.sh | bash$ anyr codex$ anyr codex --model anyrouter/free
- 1.Install the anyr CLI.
- 2.Run anyr codex. First run signs you in or pastes an sk-ar- key.
- 3.Pin a model or effort with --model and --effort. Anything after -- goes to Codex.
Why use this
Codex expects an OpenAI key and base URL. Using other models or one balance across tools means editing its environment by hand.
Other ways to set it up
Env wrapper
export OPENAI_BASE_URL="https://anyrouter.dev/api/v1"
export OPENAI_API_KEY="$ANYROUTER_API_KEY"Endpoints and key
- OpenAI-compatible
- https://anyrouter.dev/api/v1
- Anthropic-compatible
- https://anyrouter.dev/api
- Key
- ANYROUTER_API_KEY (sk-ar-…)