Run the EveryAPI gateway inside Codex CLI
Codex is OpenAI's open-source Rust coding agent. `everyapi use codex` starts it in an isolated EveryAPI-owned CODEX_HOME and routes its native Responses API traffic through the gateway without overwriting your regular Codex configuration.
One base URL line points Codex CLI at EveryAPI
Default global Base URL / China-first Base URL: https://api.everyapi.ai/v1 / https://api-cn.everyapi.ai/v1
everyapi auth logineveryapi use codex # Creates an isolated ~/.config/everyapi/codex-home and sets CODEX_HOME for this launch# Uses Codex's native Responses API; your normal ~/.codex configuration is unchangedFrom zero to your first call
- Install codex
npm i -g @openai/codex or install per the official GitHub repo README. EveryAPI doesn't take over codex's own installation.
github.com/openai/codex
- Launch with everyapi use codex
The EveryAPI CLI creates ~/.config/everyapi/codex-home, writes the provider configuration and API-key auth there, sets CODEX_HOME for the child process, and then launches Codex. Your normal ~/.codex directory is left unchanged.
- Want to run another vendor's model?
Pass Codex's own --model flag after `--` when you want to select a model. The generated provider uses EveryAPI's native /v1/responses endpoint; available models depend on your account catalog.
Codex CLI × EveryAPI
Do codex's sandbox / approval modes still work?
Not affected. codex's local agent behaviors like --approval-policy / --sandbox are independent of the EveryAPI gateway and work as usual.
Should I pick the codex CLI or Claude Code?
Both work under the same EveryAPI account without conflict. The codex CLI is more OpenAI-flavored, while Claude Code is closer to the Anthropic agent style. EveryAPI isn't tied to either.