Codex CLI uses the OpenAI API. Simply point it to an OpenAI-compatible gateway.
Step 1: Install Codex CLI
Follow the Codex CLI installation instructions to install the CLI on your system.
Step 2: Configure Codex
Codex uses a
config.toml file, usually located at:~/.codex/config.toml
Create or edit this file with the following configuration:
1.model_provider = "llmpool"
2.model_reasoning_effort = "high"
3.model="~openai/gpt-latest"
4.
5.[model_providers.llmpool]
6.name = "llmpool"
7.
8.base_url="openai url"
9.env_key="LLMPOOL_API_KEY"
Step 3: Set API Key
Add the following to:
~/.zshrc ~/.bashrc
or:
~/.config/fish/config.fish
export LLMPOOL_API_KEY="..."
Step 4: Start Coding
cd /.../project codex