Codex API:
one config for CLI, desktop and VS Code

88API supports the Responses protocol that Codex uses. Point base_url in config.toml at 88API and add your token, and Codex CLI, the Codex desktop app and the Codex extension for VS Code all work. Pay as you go, with several GPT groups to choose from.

Responses protocol CLI / desktop / VS Code Free trial credit on sign-up
Already have an account? Create a token in the console
Codex model prices ¥ per million tokens
See all Codex model prices

Why run Codex on 88API

  • Responses protocol

    Codex calls models through /v1/responses, which 88API supports directly. Set wire_api to responses; no protocol conversion needed.

  • One config, three clients

    Codex CLI, the desktop app and the VS Code extension all read ~/.codex/config.toml, so one setup covers all three.

  • Several GPT groups

    Each model is offered in several groups with different channels and prices. Pick one that fits your budget; prices per group are in the table below.

  • Pay as you go

    You pay for what you use, no subscription plan. Trial credit is added automatically when you sign up, so you can test before topping up.

Three ways to connect

Create a token in the console first. The one-line scripts write ~/.codex/config.toml for you (the old file is backed up); paste your token when prompted.

  • Codex CLI

    The coding agent that runs in your terminal. Run this line on macOS, Linux or WSL; for native Windows PowerShell use the PowerShell script in the guide.

    macOS / Linux / WSL
    bash <(curl -fsSL https://88api.ai/helper/codex-cli-setup.sh)
    Codex CLI setup guide
  • Codex desktop app

    The desktop app reads the same config. Quit it completely after running the script and open it again; the macOS / Linux script is in the guide.

    Windows PowerShell
    curl.exe --ssl-no-revoke -fsSL https://88api.ai/helper/codex-client-setup.ps1 -o "$env:TEMP\codex-client-setup.ps1"
    PowerShell -NoProfile -ExecutionPolicy Bypass -File "$env:TEMP\codex-client-setup.ps1"
    Codex client setup guide
  • Codex extension for VS Code

    The Codex IDE extension also reads ~/.codex/config.toml. Write it with the client script or the manual config below, then restart VS Code.

    macOS / Linux
    bash <(curl -fsSL https://88api.ai/helper/codex-client-setup.sh)
    IDE extension setup

Manual config.toml

Prefer not to run a script? Put this in ~/.codex/config.toml (native Windows: %USERPROFILE%\.codex\config.toml) and replace the token with your own.

config.toml
model = "gpt-6.1-sol"
model_provider = "88api"
model_reasoning_effort = "high"

[model_providers.88api]
name = "88API"
base_url = "https://api.88api.ai/v1"
wire_api = "responses"
supports_websockets = false
experimental_bearer_token = "sk-your-token"

base_url must end with /v1, and wire_api must be responses.

Codex model prices

GPT models that support the Responses protocol, in every group, newest first. To switch models, change model in config.toml or type /model in Codex CLI.

Prices in CNY (¥) per million tokens; live prices are shown in the Model Square.

Codex model prices by group
Model Group Input Output Cache read
gpt-6.1-solLong context above 272K tokens is priced separatelyGPT-Plus95% off list price¥0.7¥3.5¥0.035
GPT-Pro90% off list price¥1.4¥7¥0.07
GPT-不降智80% off list price¥2.8¥14¥0.14
gpt-6-solLong context above 272K tokens is priced separatelyGPT-Plus95% off list price¥0.7¥3.5¥0.07
GPT-Pro90% off list price¥1.4¥7¥0.14
GPT-不降智80% off list price¥2.8¥14¥0.28
gpt-6-astraLong context above 272K tokens is priced separatelyGPT-Plus95% off list price¥3.5¥17.5¥0.35
GPT-Pro90% off list price¥7¥35¥0.7
GPT-不降智80% off list price¥14¥70¥1.4
gpt-5.6-terraLong context above 272K tokens is priced separatelyGPT-Plus95% off list price¥0.7¥4.2¥0.07
GPT-Pro90% off list price¥1.4¥8.4¥0.14
GPT-不降智80% off list price¥2.8¥16.8¥0.28
gpt-5.6-solLong context above 272K tokens is priced separatelyGPT-Plus95% off list price¥1.75¥10.5¥0.175
GPT-Pro90% off list price¥3.5¥21¥0.35
GPT-不降智80% off list price¥7¥42¥0.7
codex-auto-reviewGPT-Plus95% off list price¥1.75¥10.5¥0.175
GPT-Pro90% off list price¥3.5¥21¥0.35

FAQ

Run Codex on 88API today

Trial credit is added automatically when you sign up. Create a token, run the setup script and Codex CLI, the desktop app and the VS Code extension are ready.