Codex CLI
Codex CLI uses a custom model_provider with the Responses wire API.
Official source and verification
This page was verified on 2026-07-13 against the official source for Codex CLI 0.144.3. Official source. Verification covers the custom provider structure from the official configuration documentation.
One-click setup
Sign in to the PopGo API keys page and open the action menu on the target Key row. Public documentation never creates or displays a link containing a Key. Choose CC Switch, then Codex. After importing the Codex setup, verify that the Base URL ends at the /v1 level.
Manual setup
Set POPGO_API_KEY in the terminal, then add the provider block below to the Codex configuration file.
export POPGO_API_KEY="YOUR_API_KEY"
model = "YOUR_MODEL"
model_provider = "popgo"
[model_providers.popgo]
name = "PopGo"
base_url = "https://api.popgo.site/v1"
env_key = "POPGO_API_KEY"
wire_api = "responses"
Success check
Start a new session from the terminal containing the environment variable and send a request with YOUR_MODEL. Start a new test request with YOUR_MODEL. A normal response without authentication or address errors confirms the connection.
Common errors and recovery
- If the Key is reported missing, verify the exact variable name
POPGO_API_KEYand restart from the current terminal. - For a 401, paste
YOUR_API_KEYagain and remove surrounding whitespace. - For a 404, verify the Base URL level and make sure the client is not appending
/v1twice.