球球TokenQiuqiu Token Docs中文

Codex CLI

Codex CLI is the terminal entry for OpenAI Codex. With Qiuqiu Token, use the automated tools first, and only fall back to manual commands when needed.

Prerequisites

  • Node.js 18+ and npm are only required when you install manually with npm.
  1. Windows users should try AI Tool Auto Installer first.
  2. If the installer does not apply, use CC Switch Quick Config to write the Qiuqiu Token provider, Codex token, Base URL, and model.
  3. Continue with the manual steps below only when needed.

Install and Configure

Prepare balance and the Codex Base URL in Quick Start, then create a Codex token in Create an API Token.

Windows

If the installer or CC Switch has already configured Codex, open your project folder and run codex to verify.

Install Node.js

Install Node.js LTS from nodejs.org or use one package manager:

Command Prompt / Terminal
winget install OpenJS.NodeJS.LTS
choco install nodejs-lts
scoop install nodejs-lts
Command Prompt / Terminal
node -v
npm -v

Install Codex CLI

Command Prompt / Terminal
npm install -g @openai/codex@latest
Command Prompt / Terminal
codex --version

Start Codex

Command Prompt / Terminal
cd your-project-folder
codex

Manual Configuration

Create the configuration directory:

  • Windows: %USERPROFILE%\.codex
  • macOS / Linux: ~/.codex
Command Prompt / Terminal
mkdir %USERPROFILE%\.codex
cd %USERPROFILE%\.codex

Create config.toml

Create config.toml in the configuration directory:

config.toml
model_provider = "qiuqiutoken"
model = "gpt-5.4"
model_reasoning_effort = "xhigh"
network_access = "enabled"
disable_response_storage = true

[model_providers.qiuqiutoken]
name = "OpenAI"
base_url = "https://api.qiuqiutoken.com/v1"
wire_api = "responses"
requires_openai_auth = true

Create auth.json

Create auth.json in the same directory and replace the sample value with your Codex token key.

auth.json
{
  "OPENAI_API_KEY": "PASTE_CODEX_TOKEN_KEY"
}

Verification

  • The terminal recognizes codex.
  • config.toml contains the Qiuqiu Token provider with wire_api = "responses" and requires_openai_auth = true.
  • auth.json contains the Codex token key.
  • Codex CLI starts in a project directory and completes a small request.
  • The Qiuqiu Token console shows usage.

FAQ

  • codex does not exist: add the npm global bin directory to PATH and reopen the terminal.
  • It still connects to the default service: confirm that .codex/config.toml points to the Qiuqiu Token API.
  • Authentication fails: confirm that you are using a Codex token group and not default.