Codex v1.0.47 Enter your Codex API username to load and test protected API calls.

API Documentation

This service exposes a versioned HTTP adapter over the local Codex app-server. The stable surface for browser-based coding agents is under /api/v1. Search is enabled by default, managed projects resume the latest Codex thread for the same workspace, and approval-aware coding flows remain explicit rather than hidden.

Version: v1.0.47. Customer API authentication now treats the Codex API username as the bearer value. For example, a user named g2g-codex-example can call protected client endpoints with Authorization: Bearer g2g-codex-example. Existing generated API keys still work for backward compatibility, while admin-only routes still require an admin bearer key.

Auth Model

Official-Compatible Model APIs

CodexAPI.pro exposes additive compatibility endpoints for coding clients that expect the official OpenAI and Anthropic-style HTTP surfaces. These endpoints use the same wallet, internal rate cards, model-selection policy, and admin routing source of truth as the existing CLI endpoints.

API Test Zone

These examples automatically use the bearer value in the field above. When a client opens this page from the dashboard, that value is their Codex API username. Replace the prompt text and project names as needed.

1. Verify your wallet account

          
2. Verify stock Codex model discovery

          
3. Start a browser-agent project

          

Official OpenAI Codex CLI

Use the customer's Codex API username with the official OpenAI package installed by npm install -g @openai/codex@latest. The API compatibility target is Codex CLI 0.141.0. Do not run codex login for CodexAPI.pro; configure CodexAPI.pro as a custom Responses provider and save the username in ~/.codex/config.toml using the dashboard's one-time setup command.

After the one-time setup has written CodexAPI.pro into the normal Codex config, users can return with codex, codex --search, codex resume --search, or any other normal Codex opening command without repeating API setup.

For non-interactive live-search runs, use codex --search exec .... The current official CLI rejects codex exec --search ....

The dashboard returns a token-specific command after creation; the generic provider shape is:

{
  "providerId": "codexapi",
  "providerName": "CodexAPI.pro",
  "officialCliVersion": "0.141.0",
  "officialInstallTag": "latest",
  "officialInstallCommand": "npm install -g @openai/codex@latest",
  "baseUrl": "https://api-chicago.codexapi.pro/v1",
  "envKey": "CODEXAPI_CODEX_API_KEY",
  "wireApi": "responses",
  "model": "gpt-5.5",
  "reasoningEffort": "high",
  "modelsUrl": "https://api-chicago.codexapi.pro/v1/models",
  "responsesUrl": "https://api-chicago.codexapi.pro/v1/responses",
  "codexHome": "$HOME/.codex",
  "configArgs": [
    "-c 'model_provider=\"codexapi\"'",
    "-c 'model_providers.codexapi.name=\"CodexAPI.pro\"'",
    "-c 'model_providers.codexapi.base_url=\"https://api-chicago.codexapi.pro/v1\"'",
    "-c 'model_providers.codexapi.env_key=\"CODEXAPI_CODEX_API_KEY\"'",
    "-c 'model_providers.codexapi.wire_api=\"responses\"'",
    "-c 'model_providers.codexapi.supports_websockets=false'",
    "-c 'model_reasoning_effort=\"high\"'",
    "-c 'features.apps=false'",
    "-c 'approval_policy=\"never\"'",
    "-c 'sandbox_mode=\"danger-full-access\"'"
  ],
  "persistentConfigToml": "model = \"gpt-5.5\"\nmodel_provider = \"codexapi\"\nmodel_reasoning_effort = \"high\"\napproval_policy = \"never\"\nsandbox_mode = \"danger-full-access\"\n\n[features]\napps = false\n\n[model_providers.codexapi]\nname = \"CodexAPI.pro\"\nbase_url = \"https://api-chicago.codexapi.pro/v1\"\nexperimental_bearer_token = \"<CODEXAPI_API_KEY>\"\nwire_api = \"responses\"\nsupports_websockets = false\n",
  "linuxSetupAndStartCommand": "set -e\nif ! command -v npm >/dev/null 2>&1; then\n  if command -v apt-get >/dev/null 2>&1; then\n    sudo apt-get update\n    sudo apt-get install -y ca-certificates curl gnupg\n    curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -\n    sudo apt-get install -y nodejs git\n  else\n    echo \"Install Node.js LTS and npm first, then rerun this block.\" >&2\n    exit 1\n  fi\nfi\nnpm install -g @openai/codex@latest\nCODEX_HOME_DIR=\"$HOME/.codex\"\nCONFIG_PATH=\"$CODEX_HOME_DIR/config.toml\"\nmkdir -p \"$CODEX_HOME_DIR\" 2>/dev/null || true\nif [ -e \"$CODEX_HOME_DIR\" ] && [ ! -w \"$CODEX_HOME_DIR\" ]; then\n  echo \"Fixing ownership of $CODEX_HOME_DIR for this user...\"\n  if command -v sudo >/dev/null 2>&1; then sudo chown -R \"$(id -u):$(id -g)\" \"$CODEX_HOME_DIR\"; fi\nfi\nif [ -e \"$CONFIG_PATH\" ] && [ ! -w \"$CONFIG_PATH\" ]; then\n  echo \"Fixing ownership of $CONFIG_PATH for this user...\"\n  if command -v sudo >/dev/null 2>&1; then sudo chown \"$(id -u):$(id -g)\" \"$CONFIG_PATH\"; fi\nfi\nmkdir -p \"$CODEX_HOME_DIR\"\nif [ ! -w \"$CODEX_HOME_DIR\" ] || { [ -e \"$CONFIG_PATH\" ] && [ ! -w \"$CONFIG_PATH\" ]; }; then\n  echo \"Cannot write Codex config at $CONFIG_PATH. Run: sudo chown -R \\\"$(id -u):$(id -g)\\\" \\\"$CODEX_HOME_DIR\\\"\" >&2\n  exit 1\nfi\nrm -rf \"$CODEX_HOME_DIR/cache/codex_apps_tools\" 2>/dev/null || true\nif [ -f \"$CONFIG_PATH\" ]; then cp \"$CONFIG_PATH\" \"$CONFIG_PATH.backup.$(date +%Y%m%d%H%M%S)\"; fi\ncat > \"$CONFIG_PATH\" <<'TOML'\nmodel = \"gpt-5.5\"\nmodel_provider = \"codexapi\"\nmodel_reasoning_effort = \"high\"\napproval_policy = \"never\"\nsandbox_mode = \"danger-full-access\"\n\n[features]\napps = false\n\n[model_providers.codexapi]\nname = \"CodexAPI.pro\"\nbase_url = \"https://api-chicago.codexapi.pro/v1\"\nexperimental_bearer_token = \"<CODEXAPI_API_KEY>\"\nwire_api = \"responses\"\nsupports_websockets = false\nTOML\necho \"CodexAPI.pro is configured. Future sessions can start with codex or codex resume --search.\"\ncodex --search",
  "macosSetupAndStartCommand": "set -e\nBREW_BIN=\"$(command -v brew 2>/dev/null || true)\"\nif [ -z \"$BREW_BIN\" ] && [ -x /opt/homebrew/bin/brew ]; then BREW_BIN=\"/opt/homebrew/bin/brew\"; fi\nif [ -z \"$BREW_BIN\" ] && [ -x /usr/local/bin/brew ]; then BREW_BIN=\"/usr/local/bin/brew\"; fi\nif [ -z \"$BREW_BIN\" ]; then\n  /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\n  if [ -x /opt/homebrew/bin/brew ]; then BREW_BIN=\"/opt/homebrew/bin/brew\"; fi\n  if [ -z \"$BREW_BIN\" ] && [ -x /usr/local/bin/brew ]; then BREW_BIN=\"/usr/local/bin/brew\"; fi\nfi\nif [ -z \"$BREW_BIN\" ]; then echo \"Homebrew installation finished but brew was not found. Open a new Terminal and rerun this setup.\" >&2; exit 1; fi\neval \"$(\"$BREW_BIN\" shellenv)\"\nbrew list node >/dev/null 2>&1 || brew install node\nbrew list git >/dev/null 2>&1 || brew install git\nhash -r 2>/dev/null || true\nif ! npm install -g @openai/codex@latest; then\n  echo \"Global npm install failed. Retrying with a user-owned npm prefix at $HOME/.npm-global.\"\n  mkdir -p \"$HOME/.npm-global\"\n  npm config set prefix \"$HOME/.npm-global\"\n  export PATH=\"$HOME/.npm-global/bin:$PATH\"\n  npm install -g @openai/codex@latest\nfi\nexport PATH=\"$(npm config get prefix)/bin:$PATH\"\nhash -r 2>/dev/null || true\nappend_codexapi_path() {\n  profile=\"$1\"\n  mkdir -p \"$(dirname \"$profile\")\"\n  touch \"$profile\"\n  if ! grep -q \"# BEGIN CODEXAPI_PRO_NPM_PATH\" \"$profile\" 2>/dev/null; then\n    cat >> \"$profile\" <<'ENV'\n# BEGIN CODEXAPI_PRO_NPM_PATH\nexport PATH=\"$HOME/.npm-global/bin:/opt/homebrew/bin:/usr/local/bin:$PATH\"\n# END CODEXAPI_PRO_NPM_PATH\nENV\n  fi\n}\nappend_codexapi_path \"$HOME/.zshrc\"\nappend_codexapi_path \"$HOME/.zprofile\"\nappend_codexapi_path \"$HOME/.bashrc\"\nappend_codexapi_path \"$HOME/.profile\"\ncodex --version\nCODEX_HOME_DIR=\"$HOME/.codex\"\nCONFIG_PATH=\"$CODEX_HOME_DIR/config.toml\"\nmkdir -p \"$CODEX_HOME_DIR\" 2>/dev/null || true\nif [ -e \"$CODEX_HOME_DIR\" ] && [ ! -w \"$CODEX_HOME_DIR\" ]; then\n  echo \"Fixing ownership of $CODEX_HOME_DIR for this user...\"\n  if command -v sudo >/dev/null 2>&1; then sudo chown -R \"$(id -u):$(id -g)\" \"$CODEX_HOME_DIR\"; fi\nfi\nif [ -e \"$CONFIG_PATH\" ] && [ ! -w \"$CONFIG_PATH\" ]; then\n  echo \"Fixing ownership of $CONFIG_PATH for this user...\"\n  if command -v sudo >/dev/null 2>&1; then sudo chown \"$(id -u):$(id -g)\" \"$CONFIG_PATH\"; fi\nfi\nmkdir -p \"$CODEX_HOME_DIR\"\nif [ ! -w \"$CODEX_HOME_DIR\" ] || { [ -e \"$CONFIG_PATH\" ] && [ ! -w \"$CONFIG_PATH\" ]; }; then\n  echo \"Cannot write Codex config at $CONFIG_PATH. Run: sudo chown -R \\\"$(id -u):$(id -g)\\\" \\\"$CODEX_HOME_DIR\\\"\" >&2\n  exit 1\nfi\nrm -rf \"$CODEX_HOME_DIR/cache/codex_apps_tools\" 2>/dev/null || true\nif [ -f \"$CONFIG_PATH\" ]; then cp \"$CONFIG_PATH\" \"$CONFIG_PATH.backup.$(date +%Y%m%d%H%M%S)\"; fi\ncat > \"$CONFIG_PATH\" <<'TOML'\nmodel = \"gpt-5.5\"\nmodel_provider = \"codexapi\"\nmodel_reasoning_effort = \"high\"\napproval_policy = \"never\"\nsandbox_mode = \"danger-full-access\"\n\n[features]\napps = false\n\n[model_providers.codexapi]\nname = \"CodexAPI.pro\"\nbase_url = \"https://api-chicago.codexapi.pro/v1\"\nexperimental_bearer_token = \"<CODEXAPI_API_KEY>\"\nwire_api = \"responses\"\nsupports_websockets = false\nTOML\necho \"CodexAPI.pro is configured. Future macOS sessions can start with codex --search or codex resume --search.\"\ncodex --search",
  "futureStartCommand": "codex\ncodex --search",
  "startCommand": "set -e\nif ! command -v npm >/dev/null 2>&1; then\n  if command -v apt-get >/dev/null 2>&1; then\n    sudo apt-get update\n    sudo apt-get install -y ca-certificates curl gnupg\n    curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -\n    sudo apt-get install -y nodejs git\n  else\n    echo \"Install Node.js LTS and npm first, then rerun this block.\" >&2\n    exit 1\n  fi\nfi\nnpm install -g @openai/codex@latest\nCODEX_HOME_DIR=\"$HOME/.codex\"\nCONFIG_PATH=\"$CODEX_HOME_DIR/config.toml\"\nmkdir -p \"$CODEX_HOME_DIR\" 2>/dev/null || true\nif [ -e \"$CODEX_HOME_DIR\" ] && [ ! -w \"$CODEX_HOME_DIR\" ]; then\n  echo \"Fixing ownership of $CODEX_HOME_DIR for this user...\"\n  if command -v sudo >/dev/null 2>&1; then sudo chown -R \"$(id -u):$(id -g)\" \"$CODEX_HOME_DIR\"; fi\nfi\nif [ -e \"$CONFIG_PATH\" ] && [ ! -w \"$CONFIG_PATH\" ]; then\n  echo \"Fixing ownership of $CONFIG_PATH for this user...\"\n  if command -v sudo >/dev/null 2>&1; then sudo chown \"$(id -u):$(id -g)\" \"$CONFIG_PATH\"; fi\nfi\nmkdir -p \"$CODEX_HOME_DIR\"\nif [ ! -w \"$CODEX_HOME_DIR\" ] || { [ -e \"$CONFIG_PATH\" ] && [ ! -w \"$CONFIG_PATH\" ]; }; then\n  echo \"Cannot write Codex config at $CONFIG_PATH. Run: sudo chown -R \\\"$(id -u):$(id -g)\\\" \\\"$CODEX_HOME_DIR\\\"\" >&2\n  exit 1\nfi\nrm -rf \"$CODEX_HOME_DIR/cache/codex_apps_tools\" 2>/dev/null || true\nif [ -f \"$CONFIG_PATH\" ]; then cp \"$CONFIG_PATH\" \"$CONFIG_PATH.backup.$(date +%Y%m%d%H%M%S)\"; fi\ncat > \"$CONFIG_PATH\" <<'TOML'\nmodel = \"gpt-5.5\"\nmodel_provider = \"codexapi\"\nmodel_reasoning_effort = \"high\"\napproval_policy = \"never\"\nsandbox_mode = \"danger-full-access\"\n\n[features]\napps = false\n\n[model_providers.codexapi]\nname = \"CodexAPI.pro\"\nbase_url = \"https://api-chicago.codexapi.pro/v1\"\nexperimental_bearer_token = \"<CODEXAPI_API_KEY>\"\nwire_api = \"responses\"\nsupports_websockets = false\nTOML\necho \"CodexAPI.pro is configured. Future sessions can start with codex or codex resume --search.\"\ncodex --search",
  "execSmokeTestCommand": "codex --search exec --skip-git-repo-check \"Say hello from CodexAPI.pro.\"",
  "loggedInOverrideCommand": "set -e\nif ! command -v npm >/dev/null 2>&1; then\n  if command -v apt-get >/dev/null 2>&1; then\n    sudo apt-get update\n    sudo apt-get install -y ca-certificates curl gnupg\n    curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -\n    sudo apt-get install -y nodejs git\n  else\n    echo \"Install Node.js LTS and npm first, then rerun this block.\" >&2\n    exit 1\n  fi\nfi\nnpm install -g @openai/codex@latest\nCODEX_HOME_DIR=\"$HOME/.codex\"\nCONFIG_PATH=\"$CODEX_HOME_DIR/config.toml\"\nmkdir -p \"$CODEX_HOME_DIR\" 2>/dev/null || true\nif [ -e \"$CODEX_HOME_DIR\" ] && [ ! -w \"$CODEX_HOME_DIR\" ]; then\n  echo \"Fixing ownership of $CODEX_HOME_DIR for this user...\"\n  if command -v sudo >/dev/null 2>&1; then sudo chown -R \"$(id -u):$(id -g)\" \"$CODEX_HOME_DIR\"; fi\nfi\nif [ -e \"$CONFIG_PATH\" ] && [ ! -w \"$CONFIG_PATH\" ]; then\n  echo \"Fixing ownership of $CONFIG_PATH for this user...\"\n  if command -v sudo >/dev/null 2>&1; then sudo chown \"$(id -u):$(id -g)\" \"$CONFIG_PATH\"; fi\nfi\nmkdir -p \"$CODEX_HOME_DIR\"\nif [ ! -w \"$CODEX_HOME_DIR\" ] || { [ -e \"$CONFIG_PATH\" ] && [ ! -w \"$CONFIG_PATH\" ]; }; then\n  echo \"Cannot write Codex config at $CONFIG_PATH. Run: sudo chown -R \\\"$(id -u):$(id -g)\\\" \\\"$CODEX_HOME_DIR\\\"\" >&2\n  exit 1\nfi\nrm -rf \"$CODEX_HOME_DIR/cache/codex_apps_tools\" 2>/dev/null || true\nif [ -f \"$CONFIG_PATH\" ]; then cp \"$CONFIG_PATH\" \"$CONFIG_PATH.backup.$(date +%Y%m%d%H%M%S)\"; fi\ncat > \"$CONFIG_PATH\" <<'TOML'\nmodel = \"gpt-5.5\"\nmodel_provider = \"codexapi\"\nmodel_reasoning_effort = \"high\"\napproval_policy = \"never\"\nsandbox_mode = \"danger-full-access\"\n\n[features]\napps = false\n\n[model_providers.codexapi]\nname = \"CodexAPI.pro\"\nbase_url = \"https://api-chicago.codexapi.pro/v1\"\nexperimental_bearer_token = \"<CODEXAPI_API_KEY>\"\nwire_api = \"responses\"\nsupports_websockets = false\nTOML\necho \"CodexAPI.pro is configured. Future sessions can start with codex or codex resume --search.\"\ncodex --search",
  "loggedInOverrideExecSmokeTestCommand": "codex --search exec --skip-git-repo-check \"Say hello from CodexAPI.pro.\"",
  "resumeLastCommand": "codex resume --search\ncodex resume --last --search",
  "windowsDependencyInstallCommand": "# Run PowerShell as Administrator for this dependency step.\nwinget source update\nwinget install --id OpenJS.NodeJS.LTS -e --accept-package-agreements --accept-source-agreements\nwinget install --id Git.Git -e --accept-package-agreements --accept-source-agreements\nSet-ExecutionPolicy -Scope CurrentUser RemoteSigned -Force\n# Close PowerShell, open a new PowerShell window, then run the verification step.",
  "windowsVerifyDependenciesCommand": "node --version\nnpm --version\ngit --version",
  "windowsCodexInstallCommand": "npm install -g @openai/codex@latest\ncodex --version",
  "windowsFullInstallCommand": "# Run PowerShell as Administrator for this dependency step.\nwinget source update\nwinget install --id OpenJS.NodeJS.LTS -e --accept-package-agreements --accept-source-agreements\nwinget install --id Git.Git -e --accept-package-agreements --accept-source-agreements\nSet-ExecutionPolicy -Scope CurrentUser RemoteSigned -Force\n# Close PowerShell, open a new PowerShell window, then run the verification step.\n\n# After reopening PowerShell:\nnode --version\nnpm --version\ngit --version\nnpm install -g @openai/codex@latest\ncodex --version",
  "windowsSetupAndStartCommand": "$ErrorActionPreference = \"Stop\"\nwinget source update\nif (-not (Get-Command node -ErrorAction SilentlyContinue)) { winget install --id OpenJS.NodeJS.LTS -e --accept-package-agreements --accept-source-agreements }\nif (-not (Get-Command git -ErrorAction SilentlyContinue)) { winget install --id Git.Git -e --accept-package-agreements --accept-source-agreements }\nnpm install -g @openai/codex@latest\n$CodexHome = \"$env:USERPROFILE\\.codex\"\n$ConfigPath = Join-Path $CodexHome \"config.toml\"\nNew-Item -ItemType Directory -Force -Path $CodexHome | Out-Null\n$ConfigProbe = Join-Path $CodexHome \".codexapi-write-test\"\ntry {\n  \"ok\" | Set-Content -Path $ConfigProbe -Encoding utf8 -Force\n  Remove-Item $ConfigProbe -Force\n} catch {\n  Write-Error \"Cannot write to $CodexHome. Open PowerShell as your normal Windows user, or fix folder ownership if this .codex folder was created by an Administrator shell.\"\n  throw\n}\nif (Test-Path $ConfigPath) {\n  Copy-Item $ConfigPath \"$ConfigPath.backup.$((Get-Date).ToString('yyyyMMddHHmmss'))\" -Force\n}\n$CodexAppsCache = Join-Path $CodexHome \"cache\\codex_apps_tools\"\nRemove-Item -Recurse -Force -ErrorAction SilentlyContinue $CodexAppsCache\n@'\nmodel = \"gpt-5.5\"\nmodel_provider = \"codexapi\"\nmodel_reasoning_effort = \"high\"\napproval_policy = \"never\"\nsandbox_mode = \"danger-full-access\"\n\n[features]\napps = false\n\n[model_providers.codexapi]\nname = \"CodexAPI.pro\"\nbase_url = \"https://api-chicago.codexapi.pro/v1\"\nexperimental_bearer_token = \"<CODEXAPI_API_KEY>\"\nwire_api = \"responses\"\nsupports_websockets = false\n'@ | Set-Content -Path $ConfigPath -Encoding utf8\nWrite-Host \"CodexAPI.pro is configured. Future sessions can start with codex or codex resume --search.\"\ncodex --search",
  "windowsSetupCommand": "$ErrorActionPreference = \"Stop\"\nwinget source update\nif (-not (Get-Command node -ErrorAction SilentlyContinue)) { winget install --id OpenJS.NodeJS.LTS -e --accept-package-agreements --accept-source-agreements }\nif (-not (Get-Command git -ErrorAction SilentlyContinue)) { winget install --id Git.Git -e --accept-package-agreements --accept-source-agreements }\nnpm install -g @openai/codex@latest\n$CodexHome = \"$env:USERPROFILE\\.codex\"\n$ConfigPath = Join-Path $CodexHome \"config.toml\"\nNew-Item -ItemType Directory -Force -Path $CodexHome | Out-Null\n$ConfigProbe = Join-Path $CodexHome \".codexapi-write-test\"\ntry {\n  \"ok\" | Set-Content -Path $ConfigProbe -Encoding utf8 -Force\n  Remove-Item $ConfigProbe -Force\n} catch {\n  Write-Error \"Cannot write to $CodexHome. Open PowerShell as your normal Windows user, or fix folder ownership if this .codex folder was created by an Administrator shell.\"\n  throw\n}\nif (Test-Path $ConfigPath) {\n  Copy-Item $ConfigPath \"$ConfigPath.backup.$((Get-Date).ToString('yyyyMMddHHmmss'))\" -Force\n}\n$CodexAppsCache = Join-Path $CodexHome \"cache\\codex_apps_tools\"\nRemove-Item -Recurse -Force -ErrorAction SilentlyContinue $CodexAppsCache\n@'\nmodel = \"gpt-5.5\"\nmodel_provider = \"codexapi\"\nmodel_reasoning_effort = \"high\"\napproval_policy = \"never\"\nsandbox_mode = \"danger-full-access\"\n\n[features]\napps = false\n\n[model_providers.codexapi]\nname = \"CodexAPI.pro\"\nbase_url = \"https://api-chicago.codexapi.pro/v1\"\nexperimental_bearer_token = \"<CODEXAPI_API_KEY>\"\nwire_api = \"responses\"\nsupports_websockets = false\n'@ | Set-Content -Path $ConfigPath -Encoding utf8\nWrite-Host \"CodexAPI.pro is configured. Future sessions can start with codex or codex resume --search.\"\ncodex --search",
  "windowsStartCommand": "codex\ncodex --search",
  "windowsResumeLastCommand": "codex resume --search\ncodex resume --last --search",
  "windowsExecSmokeTestCommand": "codex --search exec --skip-git-repo-check \"Say hello from CodexAPI.pro.\"",
  "macosStartCommand": "codex\ncodex --search",
  "macosResumeLastCommand": "codex resume --search\ncodex resume --last --search",
  "macosExecSmokeTestCommand": "codex --search exec --skip-git-repo-check \"Say hello from CodexAPI.pro.\"",
  "configToml": "model = \"gpt-5.5\"\nmodel_provider = \"codexapi\"\nmodel_reasoning_effort = \"high\"\napproval_policy = \"never\"\nsandbox_mode = \"danger-full-access\"\n\n[features]\napps = false\n\n[model_providers.codexapi]\nname = \"CodexAPI.pro\"\nbase_url = \"https://api-chicago.codexapi.pro/v1\"\nenv_key = \"CODEXAPI_CODEX_API_KEY\"\nwire_api = \"responses\"\nsupports_websockets = false\n",
  "clientModelLabel": "Deepseek v4 Budget",
  "displayModel": "Deepseek v4 Budget",
  "modelDisplayName": "Deepseek v4 Budget"
}

Windows users must use PowerShell syntax, not Bash exports. The live /api/v1/cli/public-codex payload includes a complete PowerShell setup block that installs dependencies when needed, writes %USERPROFILE%\.codex\config.toml, saves the wallet username as the provider bearer token, and starts codex --search.

Managed Defaults

Codex 0.135.0 Notes

Primary Flow

Wallet Billing

Resume, Isolation, and Approvals

Each managed project_id maps to one stable workspace directory. When the same user returns to that project, the API resumes the latest Codex thread for that workspace instead of creating a fresh conversation.

Project-scoped approval handling stays explicit:

Version & Changelog

v1.0.47

# Changelog

## Admin runtime provider catalog cleanup - 2026-06-18

- Removed the retired external provider from the Admin Manage Models provider catalog and defaults.
- Made Oneprovider (`https://api.oneprovider.dev`) the only external provider displayed for Codex and Claude runtime source selection.
- Normalized stale external Claude provider env values to Oneprovider in the admin current-state payload and removed legacy fallback env writes.
- Verified API-provider mode generates the correct Codex and Claude runtime env values with provider secrets redacted in logs.

## Admin internal pricing percentage controls - 2026-06-18

- Added a live internal rate table and percentage adjustment control to the main CodexAPI.pro / ChatPlus Admin Token Rates page.
- Added browser-session and Admin API endpoints for percentage-based internal rate changes while keeping customer display rates unchanged.
- Added MyAPI.world PostgreSQL-backed live rate settings, per-request rate reads, and a MyAPI Admin Internal Pricing page with live rates and percentage adjustment.
- Refreshed operational documentation for the new pricing controls.

## Admin cross-model routing - 2026-06-18

- Moved GPT-5.5 traffic on Canada and Chicago back to the signed-in Codex account route with `CODEXAPI_GPT55_ROUTE_MODE=codex`.
- Added Cross-Model Routing to Admin Manage Models, allowing admin to choose native routing, GPT-5.5 via Opus 4.8, or Opus 4.8 via GPT-5.5 across both API servers.
- Changed Claude route-mode checks to read `/etc/codexapi/codexapi.env` live at request start, so already-open CLI sessions pick up admin route changes on their next request without needing customer relogin.

## Operational state documentation refresh - 2026-06-18

- Added `/root/codexapi/STATE.md` as the central non-secret production state map for CodexAPI.pro, ChatPlus, MyAPI.world, API regions, routing, billing, desktop apps, and CLI launchers.
- Refreshed `AGENTS.md`, `memories.md`, and `README.md` so they reflect current verified versions: Codex CLI `0.140.0`, Claude Code CLI `2.1.170`, `@codexapi/codexclaude` `2.0.11`, Windows Management Tool `1.0.32`, and Desktop Chat `1.0.8`.
- Documented the then-current signed-in routing state on Canada and Chicago. This was superseded later on 2026-06-18 by the Admin cross-model routing update above, which moved GPT-5.5 back to `CODEXAPI_GPT55_ROUTE_MODE=codex`.
- Documented MyAPI.world's current wallet, 1-Day Unlimited, hourly Unlimited, Discord support, top-up, SMTP, large-payload, and PDF usage report state.

## CodexAPI.pro Management Tool v1.0.30 - 2026-06-10

- Moved Desktop push-message polling into the Electron main process so native notifications work while the app window is open, minimized to the tray, or started hidden at Windows login.
- Added local notification de-duplication so unread messages already shown on the device do not repeatedly pop after restart.
- Re-enabled Windows executable resource editing and rebuilt the multi-size app icon so the taskbar and repaired shortcuts no longer show the generic white document icon.
- Updated public installer metadata and download links to `codexapiclient1.0.30.exe`.

## v1.0.46 npm scope update - 2026-05-29

- Published the custom launcher under the official npm org package `@codexapi/codexclaude`.
- Updated customer install and forced-update commands to `npm install -g @codexapi/codexclaude@latest`.
- Released launcher `2.0.5` so the npm package page itself shows the official org-scoped install command.

## v1.0.46 - 2026-05-29

- Released `codexclaude` v2.0.4 with Deepseek v4 Budget as a third selectable model beside ChatGPT-5.5 and Opus 4.7.
- Routed `deepseek-v4-pro` Codex Responses requests through the CodexAPI.pro Deepseek-compatible gateway with a separate Deepseek billing service.
- Added npm latest-version enforcement to `codexclaude` so older agents are prompted to update before coding starts.
- Added `/root/codexclaude/codexclaude.md` as the customization ledger for future official Codex CLI upgrades.
- Updated backend release metadata and public setup copy for the new launcher.

## Desktop Setup Client v1.0.16 - 2026-05-28

- Fixed Desktop Coding Mode MCP execution for Blender and Roblox Studio by adding a local MCP stdio bridge that starts explicitly enabled MCP servers, discovers their tools, forwards those tool definitions with Opus 4.7 requests, and runs the `tool_use` / `tool_result` loop locally.
- Added MCP bridge diagnostics to the Desktop Coding Mode context and status line so customers can see whether MCP tools were forwarded and how many tool calls were executed.
- Matched Roblox Studio MCP's expected config shape with `command = "npx"` and `args = ["-y", "robloxstudio-mcp@latest"]`, while keeping existing stored `roblox_studio` preset selections compatible.
- Switched the Desktop MCP bridge to newline-delimited JSON-RPC by default so standard MCP servers such as Blender and Roblox Studio expose tools correctly.
- Hardened Windows MCP process startup so command-based MCP packages such as `npx` presets launch correctly from the desktop app.
- Updated the public Desktop Setup Client installer metadata and download links to v1.0.16.

## Desktop Setup Client v1.0.14 - 2026-05-28

- Added the CodexAPI.pro MCP + Skills Pack to the Windows Desktop Setup Client.
- Codex setup now writes popular MCP server presets into the customer's `~/.codex/config.toml`, including the OpenAI Codex memories MCP plus curated developer, browser, documentation, database, cloud, and design presets.
- Credentialed MCP servers are installed as disabled presets until the customer adds the required local environment variables.
- Claude Desktop setup now receives safe MCP server presets and bundled skills are copied into both Codex and Claude skill folders.
- Desktop Coding Mode now loads the same MCP and skill catalog into every task context.

## v1.0.45 - 2026-05-27

- Added admin-only Internal Surge Pricing for the next 12 hours at `$9` per million input tokens and `$48` per million output tokens.
- Set the permanent post-surge internal billing base for Codex and Claude to `$8` per million input tokens and `$45` per million output tokens.
- Kept customer-facing display rates unchanged while hiding internal wallet-deduction rates from customer API and dashboard payloads.
- Expanded the admin Token Rates panel with explicit internal-vs-display labels, current internal mode, active window, landing rates, tokens in-window, and extra-margin reporting.
- Improved responsive wrapping in admin cards and rate controls so long values remain readable on narrow screens.
- Refreshed SEO metadata and structured-data coverage on the public sites for clearer indexing, snippets, and social previews.

## v1.0.44 - 2026-05-27

- Updated the official Codex CLI compatibility target to `0.134.0` and synced the upstream stable release manifest.
- Updated the hosted Codex binary to `codex-cli 0.134.0` while preserving Full Access defaults and `--search` startup commands.
- Updated Claude Code on the host to `2.1.152`.
- Released `codexclaude` v2.0.3 pinned to official `@openai/codex` `0.134.0`.
- Refreshed dashboard, docs, and public copy that referenced Codex `0.133.0`.

## v1.0.43 - 2026-05-27

- Added first-login collection for email plus a customer-chosen dashboard password.
- Preserved original issued marketplace credentials while enabling email plus Chosen Password as an additional login path.
- Added admin-visible Chosen Password display under Customers & Wallets and Access & Tokens.
- Updated welcome emails with email login details and a 7-day one-click sign-on link that opens the Desktop Client download area.
- Kept the Windows Desktop Setup Client on the same login endpoint so email plus Chosen Password works there too.

## v1.0.42 - 2026-05-27

- Fixed duplicate-device and duplicate-network customer registration so flagged signups now enter admin review instead of failing with a 409 Conflict response.
- Added PostgreSQL-backed customer inbox messages for public broadcasts, private admin messages, and stored copies of lifecycle emails sent to customers.
- Added admin Inbox & Push tooling for writing public or private customer messages from `/admin`.
- Released CodexAPI.pro Desktop Setup Client v1.0.11 with broader Codex Desktop / Claude Desktop detection, corrected CodexAPI.pro provider readiness classification, Windows notifications for unread inbox messages, and system-tray minimize-on-close behavior.

## v1.0.41 - 2026-05-26

- Fixed Claude Code / VS Code routing so customer sessions stay in the customer's local project directory instead of being handled by a hosted remote Claude Code workspace.
- Added local `/v1/messages/count_tokens` support for Claude Code startup token-count probes, avoiding upstream count-token incompatibilities.
- Hardened Claude request handling so client disconnects no longer create noisy backend tracebacks.
- Released CodexAPI.pro Desktop Setup Client v1.0.10 with stricter desktop readiness checks and signed-in remote Ubuntu/Debian SSH setup for Codex CLI and Claude Code.

## v1.0.40 - 2026-05-25

- Added Google account signup directly from the Windows Desktop Setup Client using a `codexapi-desktop://` return flow.
- Added manual account creation inside the Desktop Setup Client with email, password, country, mobile, starting package, device fingerprint, and PostgreSQL-backed wallet provisioning.
- After desktop signup, the app verifies the returned wallet token, saves the login for one year, loads the Token Wallet, and enables Codex Desktop / Claude Desktop configuration.
- Released CodexAPI.pro Desktop Setup Client v1.0.9 with the signup flow and updated public installer metadata.

## v1.0.39 - 2026-05-25

- Added the three-mode pricing system: Surge Pricing, Standard Pricing, and Reduced Pricing, all served from one master countdown payload.
- Activated Reduced Pricing for the current 60-minute window at `$4.50` per million input tokens and `$27` per million output tokens.
- Added exact-text SVG pricing icons for Surge Pricing, Standard Pricing, and Reduced Pricing across the dashboard and desktop app.
- Updated the Windows Desktop Setup Client to v1.0.8 with vivid pricing-mode display, synced countdown, and refreshed installer metadata.

## v1.0.38 - 2026-05-25

- Added a 60-minute Surge Pricing event countdown with automatic fallback to normal `$5` / `$30` billing after the event expires.
- Added direct Deepseek v4 Pro surge opt-out routing for both Codex Responses and Claude Messages traffic without using OpenRouter.
- Added the exact in-session notices for customers who choose Deepseek v4 or pause during active Surge Pricing.
- Added the `$2` / `$5` Deepseek v4 opt-out billing card and separated it from standard Codex/Claude surge billing.
- Updated the Windows Desktop Setup Client to v1.0.7 with automatic 60-second balance, usage, pricing, and Toolbox refresh while the app is open.
- Added a visible Surge Event countdown beside the desktop Token Wallet, plus saved Toolbox options for Stay, Deepseek v4, and Pause.

## v1.0.37 - 2026-05-25

- Added customer-visible Surge Pricing status in the dashboard wallet card, including the active tariff, normal tariff, and Reduced Pricing target.
- Added a customer Toolbox with account-level Surge Pricing behavior: stay on the active premium route, opt Codex requests into Deepseek v4 during surge windows, or pause new model calls until the surge ends.
- Added the same Toolbox controls to the Windows Desktop Setup Client and moved the Token Wallet plus Topup action higher in the app for immediate visibility.
- Added a 7-day dashboard single sign-on link endpoint so desktop and lifecycle emails can open customers directly at the active pricing tariff section.
- Updated admin operational pages with Toolbox controls, Surge Pricing email delivery, and serving-cost margin calculations based on the configured internal cost price.
- Released CodexAPI.pro Desktop Setup Client v1.0.6 with recurring update checks, wallet-first layout, Topup shortcut, and Surge Pricing opt-out controls.

## v1.0.36 - 2026-05-25

- Added the `$99` 10-Day Unlimited Promo package with quantity support up to 5 blocks; each quantity adds another 10 days while preserving the customer's existing API username/token.
- Added Stripe Checkout handling for the promo as a one-time payment with saved-card setup for future purchases and automatic top-ups.
- Added admin Unlimited Promo settings for promo input/output cost assumptions plus 5-hour and 24-hour fair-use limits in USD.
- Added customer-facing Unlimited Promo dashboard offer cards and a usage monitor that shows token counts, reset estimates, and fair-use progress without exposing private dollar limits.
- Added dedicated Unlimited Promo invitation and activation email templates with 7-day one-click dashboard sign-on links.

## v1.0.35 - 2026-05-25

- Added Titan, Apex, and Enterprise Token Wallet packages: $120 to $1250 credit, $150 to $1600 credit, and $200 to $2200 credit.
- Confirmed the new paid credit packages fund both official Codex CLI ChatGPT-5.5 sessions and Claude Code Opus 4.7 sessions through the same customer wallet and API username.
- Refreshed customer email templates so welcome, top-up, low-balance, checkout-fix, admin-created, Google welcome, and fair-use notices explain Codex CLI plus Claude Code / Opus 4.7 setup.
- Added automatic 7-day one-click dashboard sign-on links to touchpoint emails when the customer account is known, pointing customers to `https://codexapi.pro/dashboard.html` for all setup details.
- Updated dashboard, top-up, referral, Telegram, homepage, and changelog package displays to include the new higher-credit packs.

## v1.0.34 - 2026-05-24

- Routed Claude Code API traffic through the dedicated remote Claude Code agent on the private SSH tunnel, with per-customer isolated workspaces and main-server wallet billing preserved.
- Verified separate customer-token Claude Code requests end to end through the CodexAPI.pro `/v1/messages` gateway.
- Added admin-only GPT-5.5 Usage and Opus 4.7 Usage pages showing serving cost, client charges, gross margin, daily usage, top customers, and recent requests.
- Standardized admin serving-cost reporting at $5 per million input tokens and $30 per million output tokens across both model families.

## v1.0.33 - 2026-05-24

- Released the CodexAPI.pro Desktop Setup Client v1.0.5 for Windows.
- Added direct Windows download links for Codex Desktop and Claude Desktop inside the setup client.
- Added Linux-first operating system selection to the client dashboard, with Windows desktop setup and VS Code instructions clearly separated.
- Updated the CodexAPI.pro homepage, install page, dashboard, and ChatPlus homepage with the v1.0.5 desktop client download path.

## v1.0.32 - 2026-05-23

- Restricted the promotional $149 Unlimited Credit subscription to the official OpenAI Codex CLI with ChatGPT-5.5 only.
- Added active API blockers for Opus 4.7, Claude Code, and codexclaude traffic on Unlimited subscriptions with a clear customer-facing reason.
- Updated purchase, checkout, dashboard, and documentation copy so customers see the Unlimited scope before and during purchase.
- Released `codexclaude` v2.0.2 with backend-identifying request headers so plan restrictions can be enforced server-side.

## v1.0.31 - 2026-05-23

- Fixed the `codexclaude` Opus 4.7 path so Codex Responses requests now route through a working Claude tool-call provider instead of timing out on coding/tool prompts.
- Verified the `codexclaude model` selector only exposes `ChatGPT-5.5` and `Opus 4.7`, writes the selected model to `~/.codex/config.toml`, and honors that selection before Codex starts.
- Released `codexclaude` v2.0.1 with terminal-visible changelog support and a forced-update metadata response.
- Tightened synthetic Responses streaming events for compatible model routes so Codex receives output items before text deltas.

## v1.0.30 - 2026-05-23

- Updated the current Codex compatibility target to official Codex CLI `0.133.0` while keeping public install commands on the official npm channel.
- Released `codexclaude` v2.0.0 as a forced launcher update, backed by official `@openai/codex` `0.133.0` and preserving CodexAPI.pro login, model selection, Full Access, high reasoning, fast mode, and wallet-linked provider config.
- Added a `codexclaude` wallet/status preflight line so users see their selected model, high/fast runtime profile, current project path, and Token Wallet balance before Codex starts.

## v1.0.29 - 2026-05-22

- Fixed `codexclaude login` returning `Internal Server Error` by returning the Claude Code setup payload correctly from the customer login endpoint.
- Released `codexclaude` v1.0.1 as a forced launcher update so outdated clients receive an Update Now message before normal coding resumes.
- Added a codexclaude version metadata endpoint and update gate. The update replaces only the launcher/config writer and does not delete local Codex session history.

## v1.0.28 - 2026-05-21

- Added the first CodexAPI.pro-owned coding CLI release, `codexclaude` v1.0.0, so customers can log in with dashboard credentials, choose ChatGPT-5.5 or Opus 4.7, and launch a full-access Codex workflow from one command.
- Added richer customer usage analytics with wallet-spend charts split between Codex CLI and Claude Code, daily spend, token mix, request counts, and recent billed completions.
- Made dashboard login return both Codex CLI and Claude Code setup payloads immediately so new sessions can switch model families without a refresh.

## v1.0.27 - 2026-05-19

- Added a dedicated `/gumroad` buyer activation page with Google and manual signup options.
- Added Gumroad.com customer marking and automatic one-time `$200` Token Wallet credit for Gumroad-created accounts.
- Hardened public signup creation so repeat accounts from the same IP address or device fingerprint are blocked before wallet credit is issued.

## v1.0.26 - 2026-05-19

- Updated the hosted CodexAPI.pro compatibility target and customer setup payloads to Codex CLI `0.131.0`.
- Updated the host machine's official OpenAI Codex CLI runtime target to `@openai/codex@0.131.0`.
- Bumped the in-house Codex package metadata to `0.131.0` so internal packaging tracks the current upstream Codex release.

## v1.0.25 - 2026-05-09

- Added an admin-only GPT-5.5 provider selector for the public Codex Responses gateway so new starts/resumes can use the selected GPT-5.5 route.
- Added a compatible secondary GPT-5.5 execution route while keeping all client-facing setup and model labels under CodexAPI.pro GPT-5.5.
- Added an admin model usage chart with provider/model request totals, token totals, and wallet deductions.
- Updated token wallet billing display to $5 per million input tokens and $25 per million output tokens for both providers.

## v1.0.24 - 2026-05-08

- Updated the CodexAPI.pro public Codex compatibility target to Codex CLI `0.129.0` and verified the host is already running `@openai/codex` `0.129.0` with current npm.
- Enabled Codex app-server `experimentalApi` negotiation so `permissions` profile payloads used by the new `/permissions` Full Access client toggle are accepted.
- Added `/api/v1/permissions` and `/api/v1/skills`, exposed root Codex skill availability in agent defaults, and made `CODEX_HOME=/root/.codex` explicit for the service.
- Added Windows PowerShell-specific public Codex setup/start/resume/smoke-test command support for API users.

## v1.0.23 - 2026-05-04

- Rebuilt the CodexAPI.pro homepage around instant Codex CLI API access, current wallet packs, the promotional $149 Unlimited Credit plan, Stripe top-ups, and resumable public Codex setup.
- Added fresh SEO metadata, structured data, sitemap, robots file, and a new 1200x630 Open Graph image for Google, WhatsApp, Facebook, and other social previews.
- Configured SMTP delivery for CodexAPI.pro and polished signup, wallet top-up, low-balance, and Unlimited fair-use email templates.

## v1.0.22 - 2026-05-04

- Repriced PAYG and top-up packs to the new wallet-credit values, including the private exit-intent $50 to $585 offer.
- Added a vivid top-of-dashboard top-up panel, subscription card, and exit-intent offer modal for signed-in customers.
- Added the promotional $149 Unlimited Credit subscription flow with private fair-use enforcement and admin-adjustable 5-hour and 3-day limits.

## v1.0.21 - 2026-05-03

- Hardened Stripe wallet top-ups so paid Checkout sessions are reloaded from Stripe, fulfilled idempotently, and credited as soon as the webhook or return confirmation succeeds.
- Preserved existing wallet API tokens during Stripe top-ups, low-balance SSO, and normal admin simulation so G2G buyers do not need to reconfigure Codex after adding credit.
- Added direct client simulation controls to the admin Access & Tokens page.

## v1.0.20 - 2026-05-03

- Repaired legacy G2G wallet-token state so each buyer account has exactly one active buyer API token.
- Hid expired/admin-impersonation tokens from buyer token summaries to avoid confusing G2G delivery credentials.
- Hardened dashboard login token reuse so existing active wallet tokens are preferred over creating extra buyer tokens.
- Kept the G2G creation success message visible after dashboard refresh so admins can see that the order was created.

## v1.0.19 - 2026-05-03

- Fixed G2G order creation so the admin page gives visible progress and creates a usable account from a single wallet-credit amount.
- Stopped customer dashboard logins from issuing a new wallet API token every time; existing active wallet tokens are now reused.
- Expanded the G2G delivery and token display areas so admins can read and copy the generated setup text without cramped fields.

## v1.0.18 - 2026-05-03

- Added a once-per-version release notes modal for admin and customer dashboard sessions.
- Preserved direct admin section links after login and made Access & Tokens load independently of the full dashboard refresh.
- Added wallet balances to the Access & Tokens API key list so admins can see remaining credit beside each token.

## v1.0.17 - 2026-05-02

- Corrected public Codex token billing so cumulative reported input context is stored separately and only newly added input tokens are charged.
- Added token usage idempotency by response ID to prevent duplicate wallet deductions for the same completion.
- Added billing regression coverage for the advertised `$2/M` input and `$15/M` output rates plus cumulative input delta handling.

## v1.0.16 - 2026-05-01

- Rebuilt G2G Codex delivery commands around one-time config-file setup blocks instead of long inline `-c` command strings.
- Added separate Linux/macOS/WSL and Windows PowerShell G2G setup, start, resume, and smoke-test commands.
- Updated the G2G admin command cards with exact-copy buttons and non-wrapping command rendering so marketplace delivery text stays executable.

## v1.0.15 - 2026-05-01

- Added plaintext token persistence for newly created managed API keys so admins can retrieve customer and G2G tokens after creation.
- Updated the admin Access & Tokens and Customers & Wallets tables to show full stored tokens with copy controls instead of only prefixes.
- Labeled legacy hash-only token rows clearly because older plaintext tokens cannot be reconstructed from their hashes.

## v1.0.14 - 2026-05-01

- Fixed the G2G Orders admin layout so the create form and delivery preview use the intended 5/7 grid split instead of collapsed single-column cards.
- Added scrollable delivery and command previews so generated G2G instructions remain readable after token-filled commands are created.
- Added a public favicon response and cleaned login autocomplete metadata to keep live browser verification free of avoidable console errors.

## v1.0.13 - 2026-05-01

- Added a dedicated admin G2G Orders workspace for one-click marketplace account delivery.
- Stored G2G usernames and account notes on API users for future admin reference.
- Rebuilt G2G delivery output with dashboard credentials, wallet details, and token-filled public Codex CLI commands split by state.

## v1.0.12 - 2026-05-01

- Updated the official public OpenAI Codex install command to `npm install -g @openai/codex@latest` across generated API payloads, docs, and customer-facing pages.
- Updated the CodexAPI.pro public Codex compatibility target to Codex CLI `0.128.0`.
- Reviewed the Codex `0.128.0` app-server protocol changes and documented the relevant additions: `permissions` profile selection, `thread/goal/*`, `hooks/list`, `modelProvider/capabilities/read`, and the continued stdio-first production transport.

## v1.0.11 - 2026-04-30

- Auto-issued wallet-linked API tokens when admins create API users.
- Added one-click G2G marketplace account generation with paste-ready public Codex CLI delivery instructions.
- Returned token-specific official public Codex setup, start, override, smoke-test, and resume commands with admin-created accounts.

## v1.0.10 - 2026-04-30

- Pinned customer-facing official OpenAI Codex CLI guidance for the then-current public Codex release.
- Added a one-time $10 CodexAPI.pro share-credit offer for signed-in customer wallets.
- Added live dashboard wallet refresh polling and share-credit status removal after claim.
- Updated public SEO and Open Graph metadata for the CodexAPI.pro Codex API service.

## v1.0.9 - 2026-04-29

- Changed Codex token billing to micro-USD accounting at $2 per million input tokens and $15 per million output tokens.
- Added token usage transactions with input tokens, output tokens, charged USD, and balance-after values.
- Added a customer dashboard token usage list and daily usage graph.
- Moved app-server token debits to turn completion so the wallet is charged after each completed prompt.

## v1.0.8 - 2026-04-29

- Integrated Modbot WhatsApp notifications for signup and wallet-balance thresholds.
- Added required country and WhatsApp/mobile collection during first-time signup.
- Added signed dashboard SSO links for notification-driven Stripe recharges.
- Added matching formatted email notifications for WhatsApp notices.

## v1.0.7 - 2026-04-29

- Fixed public Codex token-usage billing so completed streams drain available wallet credit instead of silently skipping deduction when usage exceeds the remaining balance.
- Added a preflight wallet check for `/v1/responses` so wallet-linked public Codex calls are blocked once a customer balance reaches zero.

## v1.0.6 - 2026-04-29

- Updated the public Codex startup commands shown on the client dashboard and install page.
- Added logged-in OpenAI Codex override commands to the client dashboard so CodexAPI.pro API settings win for that run.
- Hid register/login fields for signed-in dashboard users and added a visible logout button.

## v1.0.5 - 2026-04-29

- Corrected the official OpenAI `@openai/codex` CLI setup guide for CodexAPI.pro provider usage.
- Added generated command variants that isolate CodexAPI.pro with `CODEX_HOME="$HOME/.codexapi-codex"` so existing OpenAI/ChatGPT Codex logins are overridden for that run.
- Updated non-interactive examples to use `codex --search exec ...`, because the current official CLI rejects `codex exec --search ...`.

## v1.0.4 - 2026-04-29

- Added admin-created manual API tokens for the official OpenAI `@openai/codex` CLI provider flow.
- Returned token-specific official Codex CLI install/start/smoke-test configuration when an admin creates a token.
- Documented the manual-token workflow in `/api-docs` and the public Codex CLI guide.

## v1.0.3 - 2026-04-25

- Added admin-managed API users with username/password credentials and wallet balances stored in cents.
- Added a configurable per-call USD price for wallet-linked managed API keys.
- Added wallet charging for standard API calls made with user-linked managed API keys while leaving static tokens and unlinked keys unchanged.
- Added admin dashboard controls for billing settings, API users, wallet balances, and assigning managed API tokens to billing users.

## v1.0.2 - 2026-04-16

- Added PostgreSQL-backed managed API keys that admins can create and revoke from the hosted admin dashboard.
- Extended bearer authentication so managed `api` and `admin` keys work alongside the existing static environment tokens.
- Expanded `/api-docs` into a verbose operator-facing guide with auth rules, defaults, project lifecycle notes, approval flow details, version display, and embedded agent reference material.
- Displayed the running version and changelog directly on the admin dashboard and docs page.

## v1.0.1 - 2026-04-16

- Added the stable `/api/v1` project-scoped browser-agent surface for managed projects, turns, files, events, approvals, and resume behavior.
- Added project-scoped approval and interrupt endpoints for browser coding clients.
- Normalized managed sandbox policy values to the upstream Codex app-server wire enum format.

## v1.0.0 - 2026-04-16

- Published the HTTPS API and admin dashboard on `codexapi.pro`.
- Integrated PostgreSQL-backed admin login.
- Added public docs, release sync, security hardening, and the managed Codex app-server lifecycle API.

Every Available API Call

This catalogue is generated from the live FastAPI route table. public calls need no bearer token, api calls accept the Codex API username or a managed API key, and admin calls require an admin bearer key or admin session.

Method Path Access Tags Summary
GET/adminsystemAPI root
GET/adminadmin-admin_root
GET/admin-apiadmin-admin_api_docs
GET/admin-api/openapi.jsonadmin-admin_api_openapi
POST/admin-api/v1/admin-api-keysadminadmin-api-keysCreate a separate admin-only API key
GET/admin-api/v1/admin-api-keysadminadmin-api-keysList separate admin-only API keys
DELETE/admin-api/v1/admin-api-keys/{key_id}adminadmin-api-keysDelete a separate admin-only API key
GET/admin-api/v1/billingadminadmin-toolsRead billing settings and users
GET/admin-api/v1/claude-provider-healthadminadmin-toolsRead Claude provider health monitor settings
POST/admin-api/v1/claude-provider-healthadminadmin-toolsUpdate Claude provider health monitor settings
POST/admin-api/v1/claude-provider-health/check-nowadminadmin-toolsRun Claude provider health checks now
GET/admin-api/v1/client-api-keysadminadmin-toolsList customer/client API keys
GET/admin-api/v1/dashboardadminadmin-toolsRead an admin dashboard snapshot
GET/admin-api/v1/email/templatesadminadmin-toolsList lifecycle email templates
GET/admin-api/v1/maintenance-modeadminadmin-toolsRead maintenance mode
POST/admin-api/v1/maintenance-modeadminadmin-toolsActivate or clear maintenance mode
GET/admin-api/v1/manage-modelsadminadmin-toolsRead multi-server model routing settings
POST/admin-api/v1/manage-modelsadminadmin-toolsUpdate multi-server model routing settings
GET/admin-api/v1/meadminadmin-apiInspect the authenticated Admin API key
GET/admin-api/v1/messagesadminadmin-toolsList admin/customer messages
POST/admin-api/v1/model-health/testadminadmin-toolsRun model/provider health tests
GET/admin-api/v1/model-provideradminadmin-toolsRead current model provider configuration
GET/admin-api/v1/model-usageadminadmin-toolsRead model usage summary
GET/admin-api/v1/pending-signupsadminadmin-toolsList pending signup applications
GET/admin-api/v1/referrals/pendingadminadmin-toolsList pending referral commissions
GET/admin-api/v1/registrationsadminadmin-toolsList registration events
GET/admin-api/v1/routesadminadmin-apiList Admin API routes
POST/admin-api/v1/rpcadminadmin-toolsCall raw Codex app-server RPC
GET/admin-api/v1/server-requestsadminadmin-toolsList pending Codex server requests
GET/admin-api/v1/serving-usageadminadmin-toolsRead serving cost usage summary
GET/admin-api/v1/smtp/settingsadminadmin-toolsRead SMTP settings
GET/admin-api/v1/system/statusadminadmin-toolsRead Codex runtime status
GET/admin-api/v1/token-ratesadminadmin-toolsRead token billing rate cards
POST/admin-api/v1/token-rates/adjust-percentadminadmin-toolsAdjust internal token rates by percentage
GET/admin-api/v1/usersadminadmin-toolsList API users and wallets
POST/admin/api/2fa/disableadmin-admin_two_factor_disable
POST/admin/api/2fa/enableadmin-admin_two_factor_enable
POST/admin/api/2fa/setupadmin-admin_two_factor_setup
GET/admin/api/2fa/statusadmin-admin_two_factor_status
GET/admin/api/admin-api-keysadmin-admin_dashboard_admin_api_keys
POST/admin/api/admin-api-keysadmin-admin_dashboard_create_admin_api_key
DELETE/admin/api/admin-api-keys/{key_id}admin-admin_dashboard_delete_admin_api_key
GET/admin/api/api-keysadmin-admin_api_keys
POST/admin/api/api-keysadmin-admin_create_api_key
POST/admin/api/api-keys/{key_id}/revokeadmin-admin_revoke_api_key
POST/admin/api/auth/device/startadmin-admin_device_start
POST/admin/api/auth/logoutadmin-admin_codex_logout
GET/admin/api/billingadmin-admin_billing
POST/admin/api/billing/fup-settingsadmin-admin_update_subscription_fup_settings
POST/admin/api/billing/settingsadmin-admin_update_billing_settings
GET/admin/api/billing/unlimited-promoadmin-admin_unlimited_promo_settings
POST/admin/api/billing/unlimited-promoadmin-admin_update_unlimited_promo_settings
GET/admin/api/claude-provider-healthadmin-admin_claude_provider_health
POST/admin/api/claude-provider-healthadmin-admin_set_claude_provider_health
POST/admin/api/claude-provider-health/check-nowadmin-admin_claude_provider_health_check_now
POST/admin/api/claude-provider-health/wakeadmin-admin_claude_provider_health_wake
GET/admin/api/dashboardadmin-admin_dashboard_data
POST/admin/api/email/opus-edge-desktopadmin-admin_send_opus_edge_desktop_email
POST/admin/api/email/surge-pricingadmin-admin_send_surge_pricing_email
GET/admin/api/email/templatesadmin-admin_email_templates
POST/admin/api/email/templates/testadmin-admin_email_template_test
POST/admin/api/email/token-promoadmin-admin_send_token_promo_email
POST/admin/api/email/unlimited-coding-launchadmin-admin_send_unlimited_coding_launch_email
POST/admin/api/email/unlimited-promoadmin-admin_send_unlimited_promo_email
POST/admin/api/email/weekend-free-codingadmin-admin_send_weekend_free_coding_email
GET/admin/api/maintenance-modeadmin-admin_maintenance_mode
POST/admin/api/maintenance-modeadmin-admin_update_maintenance_mode
GET/admin/api/manage-modelsadmin-admin_manage_models
POST/admin/api/manage-modelsadmin-admin_set_manage_models
POST/admin/api/manage-models/apply-localadmin-admin_apply_manage_models_local
GET/admin/api/meadmin-admin_me
POST/admin/api/messagesadmin-admin_create_message
GET/admin/api/messagesadmin-admin_messages
POST/admin/api/model-health/testadmin-admin_model_health_test
GET/admin/api/model-provideradmin-admin_model_provider
POST/admin/api/model-provideradmin-admin_set_model_provider
GET/admin/api/model-usageadmin-admin_model_usage
GET/admin/api/modelsadmin-admin_models
GET/admin/api/pending-signupsadmin-admin_pending_signups
POST/admin/api/pending-signups/{application_id}/approveadmin-admin_approve_pending_signup
POST/admin/api/pending-signups/{application_id}/rejectadmin-admin_reject_pending_signup
GET/admin/api/referrals/pendingadmin-admin_pending_referrals
POST/admin/api/referrals/{commission_id}/reviewadmin-admin_review_referral
GET/admin/api/registrationsadmin-admin_registration_events
POST/admin/api/releases/syncadmin-admin_release_sync
POST/admin/api/rpcadmin-admin_rpc
GET/admin/api/server-requestsadmin-admin_server_requests
GET/admin/api/serving-usageadmin-admin_serving_usage
GET/admin/api/smtp/settingsadmin-admin_smtp_settings
POST/admin/api/smtp/settingsadmin-admin_update_smtp_settings
POST/admin/api/smtp/testadmin-admin_test_smtp_settings
POST/admin/api/system/startadmin-admin_system_start
POST/admin/api/system/stopadmin-admin_system_stop
GET/admin/api/threadsadmin-admin_threads
POST/admin/api/token-ratesadmin-admin_set_token_rates
GET/admin/api/token-ratesadmin-admin_token_rates
POST/admin/api/token-rates/adjust-percentadmin-admin_adjust_token_rates_percent
GET/admin/api/usersadmin-admin_api_users
POST/admin/api/usersadmin-admin_create_api_user
POST/admin/api/users/g2gadmin-admin_create_g2g_api_user
DELETE/admin/api/users/{user_id}admin-admin_delete_api_user
POST/admin/api/users/{user_id}/2fa/disableadmin-admin_disable_api_user_two_factor
POST/admin/api/users/{user_id}/activeadmin-admin_set_api_user_active
POST/admin/api/users/{user_id}/edge-regionadmin-admin_set_user_edge_region
POST/admin/api/users/{user_id}/impersonateadmin-admin_impersonate_api_user
POST/admin/api/users/{user_id}/passwordadmin-admin_set_api_user_password
POST/admin/api/users/{user_id}/unlimitedadmin-admin_add_api_user_unlimited_hours
POST/admin/api/users/{user_id}/walletadmin-admin_update_api_user_wallet
POST/admin/api/users/{user_id}/wallet/creditadmin-admin_adjust_api_user_wallet_credit
GET/admin/api/users/{user_id}/wallet/transactionsadmin-admin_api_user_wallet_credit_transactions
POST/admin/auth/2faadmin-admin_login_two_factor
POST/admin/auth/loginadmin-admin_login
POST/admin/logoutadmin-admin_logout
GET/api-docsadmin-api_docs
POST/api/auth/device/startadminauthStart ChatGPT device-code login
POST/api/auth/logoutadminauthLog out the managed Codex account
GET/api/auth/statusadminauthRead current Codex auth/account state
GET/api/codex/eventsadminrpcStream Codex notifications over SSE
POST/api/codex/notifyadminrpcSend a Codex app-server notification
POST/api/codex/rpcadminrpcCall a Codex app-server JSON-RPC method
GET/api/core/releases/currentapireleasesRead the current synced stable Codex release
POST/api/core/releases/syncadminreleasesSync the latest stable upstream Codex release
GET/api/modelsapirpcList visible Codex models
POST/api/projects/openapithreadsOpen a project by cwd, resuming the latest matching thread when present
GET/api/server-requestsadminrpcList pending server-initiated approval requests
POST/api/server-requests/{request_id}/resolveadminrpcResolve a pending server-initiated request
POST/api/system/startadminsystemStart managed Codex app-server
GET/api/system/statusadminsystemGet API runtime status
POST/api/system/stopadminsystemStop managed Codex app-server
GET/api/threadsapithreadsList Codex threads
POST/api/threadsapithreadsStart a new thread
GET/api/threads/{thread_id}apithreadsRead a thread by id
POST/api/threads/{thread_id}/resumeapithreadsResume an existing thread
POST/api/turnsapiturnsStart a new turn on a thread
POST/api/turns/{turn_id}/interruptapiturnsInterrupt an active turn
GET/api/v1/agent/statusapiagentRead the managed Codex account state and default coding-agent configuration
GET/api/v1/auth/google/callbackadminauthComplete Google sign-up or sign-in for a CodexAPI.pro wallet account
GET/api/v1/auth/google/startadminauthStart Google sign-up or sign-in for a CodexAPI.pro wallet account
POST/api/v1/auth/loginadminauthAuthenticate a CodexAPI.pro CLI user and issue a wallet-linked API key
GET/api/v1/auth/ssoadminauthOpen the customer dashboard from a signed notification link
POST/api/v1/auth/web-loginadminauthAuthenticate a CodexAPI.pro dashboard user after Cloudflare Turnstile verification
POST/api/v1/auth/web-login/2faadminauthComplete CodexAPI.pro dashboard login with a Google Authenticator code
GET/api/v1/billing/token-usageapibillingRead token usage transactions and daily spend for the current wallet
POST/api/v1/cash-wallet/stripe/checkoutapibillingCreate a Stripe Checkout Session to load real-money Cash Wallet balance
POST/api/v1/cash-wallet/stripe/confirmapibillingConfirm a paid Stripe Checkout Session and reconcile Cash Wallet balance
POST/api/v1/cash-wallet/token-purchaseapibillingUse Cash Wallet balance to buy a Token Wallet top-up package
GET/api/v1/cli/public-claude-codeadminsystemRead stock public Claude Code CLI connection settings for CodexAPI.pro
GET/api/v1/cli/public-codexadminsystemRead stock public Codex CLI connection settings for CodexAPI.pro
GET/api/v1/cli/versionadminsystemRead the current CodexAPI.pro Codex CLI release metadata
GET/api/v1/codexclaude/versionadminsystemRead the required CodexAPI.pro codexclaude launcher version
POST/api/v1/customer/registeradminauthCreate a CodexAPI.pro customer account and issue a wallet-linked API key
GET/api/v1/desktop-chat/bootstrapapidesktop-chatLoad CodexAPI.pro Desktop Chat conversations, models, and free daily quota
POST/api/v1/desktop-chat/conversationsapidesktop-chatCreate a CodexAPI.pro Desktop Chat conversation
GET/api/v1/desktop-chat/conversationsapidesktop-chatList CodexAPI.pro Desktop Chat conversations
DELETE/api/v1/desktop-chat/conversations/{conversation_id}apidesktop-chatDelete a CodexAPI.pro Desktop Chat conversation
GET/api/v1/desktop-chat/conversations/{conversation_id}/messagesapidesktop-chatRead CodexAPI.pro Desktop Chat conversation messages
POST/api/v1/desktop-chat/conversations/{conversation_id}/messagesapidesktop-chatSend a CodexAPI.pro Desktop Chat prompt with saved conversation context
GET/api/v1/desktop-chat/messages/{message_id}/research.pdfapidesktop-chatDownload a completed Desktop Chat Deep Research analysis as a PDF
GET/api/v1/desktop-chat/shoutbox/bootstrapapidesktop-chatLoad the shared CodexAPI.pro Desktop Chat Shoutbox
GET/api/v1/desktop-chat/shoutbox/messagesapidesktop-chatList shared CodexAPI.pro Desktop Chat Shoutbox messages
POST/api/v1/desktop-chat/shoutbox/messagesapidesktop-chatSend a shared CodexAPI.pro Desktop Chat Shoutbox message
POST/api/v1/desktop-chat/shoutbox/profileapidesktop-chatSet the user's shared Desktop Chat Shoutbox username
POST/api/v1/desktop/admin-loginadmindesktopCreate a one-year Desktop Setup Client admin session
GET/api/v1/desktop/admin/presenceadmindesktopList live Desktop Setup Client users for admins
POST/api/v1/desktop/admin/pushadmindesktopSend a public or private Desktop Setup Client push/inbox message
GET/api/v1/desktop/bootstrapapidesktopVerify a CodexAPI.pro token and return Windows desktop setup payloads
POST/api/v1/desktop/bug-reportapidesktopSend a customer desktop bug report to CodexAPI.pro support
GET/api/v1/desktop/coder/projectsapidesktopList Windows Desktop Coding Mode projects and managed databases
POST/api/v1/desktop/coder/projectsapidesktopCreate or resume a Windows Desktop Coding Mode project
POST/api/v1/desktop/coder/projects/purchase-slotapidesktopBuy one additional Windows Desktop Coding Mode project slot from Token Wallet credit
DELETE/api/v1/desktop/coder/projects/{project_name}apidesktopDelete a Windows Desktop Coding Mode project and its managed database
GET/api/v1/desktop/coding-sessionapidesktopLoad the saved CodexAPI.pro Desktop coding conversation history
PUT/api/v1/desktop/coding-sessionapidesktopPersist CodexAPI.pro Desktop coding conversation history
POST/api/v1/desktop/presenceapidesktopRecord a live Desktop Setup Client heartbeat
POST/api/v1/gumroad/registeradminauthCreate a Gumroad.com buyer account and load $200 Token Wallet credit
GET/api/v1/meapiauthRead the current CodexAPI.pro customer wallet and CLI configuration
POST/api/v1/me/2fa/disableapiauthDisable Google Authenticator 2FA for the current dashboard user
POST/api/v1/me/2fa/enableapiauthEnable Google Authenticator 2FA after verifying the setup code
POST/api/v1/me/2fa/setupapiauthStart Google Authenticator 2FA setup for the current dashboard user
POST/api/v1/me/api-keysapiauthCreate a wallet-linked User API Key for the current customer
GET/api/v1/me/api-keysapiauthList the current customer's System Token and wallet-linked User API Keys
DELETE/api/v1/me/api-keys/{key_id}apiauthRevoke one of the current customer's User API Keys
POST/api/v1/me/api-token/rotateapiauthRotate the current customer's Codex API username/token once every 24 hours
POST/api/v1/me/edge-regionapiauthSet the current customer's preferred Canada or Chicago API server
POST/api/v1/me/emailapiauthSave the required customer email address for the current CodexAPI.pro wallet
POST/api/v1/me/passwordapiauthChange the current CodexAPI.pro dashboard password
POST/api/v1/me/profile-nameapiauthSave the customer profile first name and surname
POST/api/v1/me/profile-name/dismissapiauthRecord that the customer skipped the profile name modal
POST/api/v1/me/sso-linkapiauthCreate a short-lived one-click dashboard sign-on link for the current customer
GET/api/v1/messagesapiauthList the current customer's inbox messages
POST/api/v1/messages/{message_id}/readapiauthMark a customer inbox message read
GET/api/v1/permissionsapiagentRead Codex permission profile presets for API clients
GET/api/v1/plansadminbillingList CodexAPI.pro wallet credit plans
POST/api/v1/projectsapiprojectsCreate a managed project workspace for a web coding session
GET/api/v1/projectsapiprojectsList managed isolated project workspaces
GET/api/v1/projects/{project_id}apiprojectsRead managed project metadata and its latest Codex thread summary
GET/api/v1/projects/{project_id}/approvalsapiagentList pending approval requests for the latest managed project thread
POST/api/v1/projects/{project_id}/approvals/{request_id}/resolveapiagentResolve a pending project-scoped approval request
GET/api/v1/projects/{project_id}/eventsapiagentStream project-scoped Codex notifications over SSE
GET/api/v1/projects/{project_id}/files/contentapiprojectsRead a file from a managed project workspace
PUT/api/v1/projects/{project_id}/files/contentapiprojectsWrite a file inside a managed project workspace
GET/api/v1/projects/{project_id}/files/treeapiprojectsList files inside a managed project workspace
POST/api/v1/projects/{project_id}/openapiagentOpen or resume a managed project and optionally start an initial turn
GET/api/v1/projects/{project_id}/stateapiagentRead project metadata, latest thread state, and pending project-scoped approvals
GET/api/v1/projects/{project_id}/threadapiagentRead the latest Codex thread for a managed project
POST/api/v1/projects/{project_id}/turnsapiagentStart a project-scoped Codex turn using the web-coding defaults
POST/api/v1/projects/{project_id}/turns/{turn_id}/interruptapiagentInterrupt an active turn for a managed project
POST/api/v1/reddit/conversionadminanalyticsSend a server-side Reddit Conversions API website event
GET/api/v1/referralapibillingRead the current CodexAPI.pro VIP Referral Club and Cash Wallet status
GET/api/v1/share-creditapibillingRead the one-time CodexAPI.pro share-credit offer for the current wallet
POST/api/v1/share-credit/claimapibillingClaim the one-time CodexAPI.pro share credit after sharing the public site
GET/api/v1/skillsapiagentList Codex skills available to API-backed Codex sessions
POST/api/v1/stripe/webhookadminbillingReceive Stripe wallet payment events
GET/api/v1/telegram/google/callbackadminauthComplete Telegram Google account linking
GET/api/v1/telegram/google/startadminauthStart Google sign-in for linking an existing CodexAPI.pro account to Telegram
POST/api/v1/telegram/webhookadminauthReceive Telegram Bot API webhook updates for dashboard actions
GET/api/v1/toolboxapiauthRead the current customer Toolbox settings
POST/api/v1/toolboxapiauthUpdate the current customer Toolbox settings
POST/api/v1/wallet/auto-topupapibillingConfigure automatic wallet top-up for the current CodexAPI.pro user
GET/api/v1/wallet/statusadminbillingRead a lightweight wallet balance snapshot for CLI launchers
POST/api/v1/wallet/stripe/checkoutapibillingCreate a Stripe Checkout Session for a CodexAPI.pro wallet credit pack
POST/api/v1/wallet/stripe/confirmapibillingConfirm a paid Stripe Checkout Session and reconcile wallet credit
POST/api/v1/wallet/top-upapibillingLoad credit onto the current CodexAPI.pro wallet after a plan payment
POST/api/v1/wallet/topup-discountapibillingValidate a user-scoped top-up bonus code
POST/api/v1/wallet/topupemail-session-discountapibillingIssue a time-boxed top-up email discount
GET/favicon.icoadmin-favicon
GET/healthadminsystemHealth check
GET/openapi.jsonadmin-openapi
POST/v1/chat/completionsapiopenai-compatibleCreate an OpenAI-compatible Chat Completion using the active CodexAPI.pro routing policy
GET/v1/chat/completionsapiopenai-compatibleList locally cached Chat Completions for this bearer
DELETE/v1/chat/completions/{completion_id}apiopenai-compatibleDelete a locally cached Chat Completion
GET/v1/chat/completions/{completion_id}apiopenai-compatibleRetrieve a locally cached Chat Completion
PATCH/v1/chat/completions/{completion_id}apiopenai-compatibleUpdate metadata for a locally cached Chat Completion
POST/v1/completionsapiopenai-compatibleCreate a legacy OpenAI-compatible text completion using the active Responses route
POST/v1/messagesapianthropic-compatibleProxy Claude Code CLI Messages API traffic through CodexAPI.pro wallet billing
POST/v1/messages/{subpath:path}apianthropic-compatibleProxy Claude Code CLI auxiliary Messages API traffic
GET/v1/modelsapiopenai-compatibleList CodexAPI.pro models for stock public Codex CLI
GET/v1/models/{model_id:path}apiopenai-compatibleRetrieve one CodexAPI.pro model descriptor
POST/v1/responsesapiopenai-compatibleProxy stock public Codex CLI Responses API traffic through CodexAPI.pro wallet billing
POST/v1/responses/count_tokensapiopenai-compatibleEstimate input tokens for an OpenAI-compatible Responses payload
DELETE/v1/responses/{response_id}apiopenai-compatibleDelete a locally cached OpenAI-compatible Responses object
GET/v1/responses/{response_id}apiopenai-compatibleRetrieve a locally cached OpenAI-compatible Responses object
POST/v1/responses/{response_id}/cancelapiopenai-compatibleCancel a Responses request if it is still pending
POST/v1/responses/{response_id}/compactapiopenai-compatibleReturn a compacted summary of a locally cached Responses object
GET/v1/responses/{response_id}/input_itemsapiopenai-compatibleList input items captured for a locally cached Responses object

Agent Reference

# Agent API v1

This document describes the stable `/api/v1` layer for a browser-based coding agent that uses the managed local Codex CLI runtime behind this service.

## Goal

The `/api/v1` layer is designed for an external web application or agentic LLM orchestration layer that needs to:

- create isolated coding projects
- resume a returning user's project history
- run Codex turns against a stable workspace
- stream live Codex events
- inspect the project file tree and file contents

It is an adapter over the existing `codex app-server` thread and turn model, not a replacement for it.

## Authentication

The hosted API accepts bearer tokens in two ways:

- static environment tokens configured on the server
- managed PostgreSQL-backed API keys created from the admin dashboard at `/admin`

Use standard API keys for the browser-agent surface. Use admin keys only when you need the privileged raw RPC, auth, or system-control endpoints.

## Defaults

Managed project runs default to:

- model: `gpt-5.5`
- effort: `medium`
- approval policy: `untrusted`
- sandbox mode on the API wire: `workspace-write`
- live web search: enabled globally by the managed Codex app-server process
- root machine skills: exposed through Codex `skills/list` and `GET /api/v1/skills`

These defaults can be overridden per request.

## Lifecycle

1. Read runtime status:

```http
GET /api/v1/agent/status
Authorization: Bearer <api-token>
```

Optional checks for the current permission and skill surfaces:

```http
GET /api/v1/permissions
Authorization: Bearer <api-token>
```

```http
GET /api/v1/skills
Authorization: Bearer <api-token>
```

2. Create a project:

```http
POST /api/v1/projects
Authorization: Bearer <api-token>
Content-Type: application/json

{
  "name": "Landing Page Builder",
  "ownerId": "user_123",
  "template": "react"
}
```

3. Open or resume the project:

```http
POST /api/v1/projects/{project_id}/open
Authorization: Bearer <api-token>
Content-Type: application/json

{}
```

4. Subscribe to live events:

```http
GET /api/v1/projects/{project_id}/events?threadId=<thread_id>
Authorization: Bearer <api-token>
Accept: text/event-stream
```

5. Start a coding turn:

```http
POST /api/v1/projects/{project_id}/turns
Authorization: Bearer <api-token>
Content-Type: application/json

{
  "prompt": "Build a polished SaaS landing page with pricing, testimonials, FAQ, and a contact form."
}
```

The `open` and `turns` responses include convenient top-level `threadId` and `turnId` fields in addition to the raw upstream payloads.

6. Rehydrate project state when the user returns:

```http
GET /api/v1/projects/{project_id}/state?includeTurns=true
Authorization: Bearer <api-token>
```

7. Surface and resolve approvals when Codex asks:

```http
GET /api/v1/projects/{project_id}/approvals
Authorization: Bearer <api-token>
```

```http
POST /api/v1/projects/{project_id}/approvals/{request_id}/resolve
Authorization: Bearer <api-token>
Content-Type: application/json

{}
```

## Resume Semantics

Managed project history is keyed by the managed workspace path for that project.

- each `project_id` maps to one stable `cwd`
- Codex session history remains attached to that `cwd`
- reopening the same project resumes the latest thread for that workspace

This means the browser agent does not need to track Codex session ids itself in the common case. It can treat `project_id` as the durable resume key.

## File Access

The file endpoints are intended for UI rendering and synchronization:

- `GET /api/v1/projects/{project_id}/files/tree`
- `GET /api/v1/projects/{project_id}/files/content?path=...`
- `PUT /api/v1/projects/{project_id}/files/content`

The tree endpoint is useful for explorer panels. The file-content endpoints are useful for editors, preview pipelines, and project snapshots.

## Approvals

Codex approvals remain part of the underlying app-server model.

- `approvalPolicy=untrusted` is the default for managed web-agent runs
- approval-bearing events continue to flow through the Codex notification stream
- project-scoped approval polling is available at `GET /api/v1/projects/{project_id}/approvals`
- project-scoped approval resolution is available at `POST /api/v1/projects/{project_id}/approvals/{request_id}/resolve`
- an empty JSON object is sufficient for a basic approval grant on the current file-change approval flow

## Full Access And Permissions

Codex CLI `0.135.0` accepts permission profile payloads only after the client
declares the `experimentalApi` capability during `initialize`. The adapter now
does this automatically.

Clients whose Full Access toggle lives under `/permissions` can read the exact
payload from:

```http
GET /api/v1/permissions
Authorization: Bearer <api-token>
```

For compatibility, managed project `open` and `turns` endpoints accept either
`permissions` or `permissionProfile`. Legacy clients can still use
`sandboxPolicy`.

## API Shape

The main endpoints a browser coding agent should bind to are:

- `GET /api/v1/agent/status`
- `GET /api/v1/permissions`
- `GET /api/v1/skills`
- `GET /api/v1/projects`
- `POST /api/v1/projects`
- `GET /api/v1/projects/{project_id}`
- `GET /api/v1/projects/{project_id}/state`
- `GET /api/v1/projects/{project_id}/thread`
- `POST /api/v1/projects/{project_id}/open`
- `POST /api/v1/projects/{project_id}/turns`
- `POST /api/v1/projects/{project_id}/turns/{turn_id}/interrupt`
- `GET /api/v1/projects/{project_id}/approvals`
- `POST /api/v1/projects/{project_id}/approvals/{request_id}/resolve`
- `GET /api/v1/projects/{project_id}/events`
- `GET /api/v1/projects/{project_id}/files/tree`
- `GET /api/v1/projects/{project_id}/files/content`
- `PUT /api/v1/projects/{project_id}/files/content`

If your frontend wants a richer approval UX, subscribe to the event stream and surface server requests explicitly.