Skip to main content

Codex App + CLI

Codex App and CLI share one local Provider configuration and connect to PopGo API through the Responses wire API.

Before configuring

  • This page uses placeholders only. Copy the real Key from PopGo API keys and the model from models and pricing.
  • One-click setup is for software that is already installed and has registered its protocol handler. Allow the browser to open the external app when prompted.
  • For manual setup, save one minimal Provider first. Enable streaming, tools, or multi-model routing only after the first request succeeds.

Official source and verification

This page was verified on 2026-07-14 against the official source for Codex App + CLI 0.144.4. Official source. Verification covers the official custom Provider structure and the local configuration shared by App and CLI.

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 /v1; App and CLI read the same local configuration.

Manual setup

Set POPGO_API_KEY in the terminal, then add the Provider block below to the Codex configuration file; App and CLI do not need separate setup.

export POPGO_API_KEY="YOUR_API_KEY"
$env: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"
  • The config file is usually under .codex/config.toml in your user directory: %USERPROFILE%\.codex\config.toml on Windows and ~/.codex/config.toml on macOS/Linux.
  • The Key is read from POPGO_API_KEY. Do not write a real Key into config.toml or a public screenshot.

Cross-platform installation and setup

  1. Check node --version and npm --version, then install the CLI using the official Codex method.
  2. The config file is normally %USERPROFILE%\.codex\config.toml on Windows or ~/.codex/config.toml on macOS/Linux.
  3. Set POPGO_API_KEY in the same terminal that starts Codex. Do not write a real Key into the config file:
$env:POPGO_API_KEY = "YOUR_API_KEY"

Use the live model ID for model. model_provider must match the Provider block name, env_key must be POPGO_API_KEY, and wire_api must be responses. Restart the App or CLI after editing.

Success check

Start the CLI from the configured terminal or reopen the App, then send a request with YOUR_MODEL.

Common errors and recovery

  • If the Key is reported missing, verify the exact variable name POPGO_API_KEY, then restart the CLI or reopen the App.
  • For a 401, paste YOUR_API_KEY again and remove surrounding whitespace.
  • For a 404, verify the Base URL level and make sure the client is not appending /v1 twice.