Codex CLI
Codex CLI uses the OpenAI API. Point it at the OpenAI-compatible gateway.
Quick Start
This guide helps you get Codex CLI running through the gateway in a few minutes.
Step 1: Install Codex CLI
Follow the Codex CLI installation guide to install the CLI on your system.
Step 2: Configure Codex
Codex uses a config.toml file, usually at ~/.codex/config.toml. Create or edit it with the following:
model_provider = "llmpool"
model_reasoning_effort = "high"
model="~openai/gpt-latest"
[model_providers.llmpool]
name = "llmpool"
base_url="https://api.benpay.ai/openai/v1"
env_key="LLMPOOL_API_KEY"
Step 3: Set your API key
# Add to ~/.zshrc, ~/.bashrc, or ~/.config/fish/config.fish
export LLMPOOL_API_KEY="..."
Step 4: Start coding
cd /path/to/your/project
codex
Step 5: Verify
Run /status in Codex CLI to confirm your connection.
> /status
Model provider: llmpool - ...