Skip to content

Codex Installation and Setup Guide

Using Codex with Fast-Token

Windows guide

System requirements

  • Windows 10 or Windows 11
  • Node.js 22+
  • npm 10+
  • Network connection

Installation steps

Prerequisite: Install Git Bash. Visit Git - Downloads to download the version for your system, then click Next through the installer to finish.

1. Install Node.js

Visit the Node.js website to download and install the latest LTS version.

2. Install codex

Open Command Prompt (CMD) or PowerShell and run:

bash
npm install -g @openai/codex

3. Verify installation

Open Command Prompt (CMD) or PowerShell and run:

bash
codex --version

Configure API

1. Get Auth Token

Visit the Fast-Token platform and:

  • Go to Console → API Tokens
  • Click Add token
  • Token group: select codex专属 (you must select this group or Codex will not work)
  • Token name: any
  • Quota: recommended unlimited
  • Leave other options at default

Create API token

2. Configuration files

Important: Replace sk-xxx below with the actual API key you generated on the Fast-Token platform.

  1. Open the .codex folder under your user profile, for example: C:\Users\testuser\.codex. (Note: If you do not see this folder, enable Show hidden items in File Explorer first.)

Open .codex folder

  1. If there is no .codex folder, create it manually, then create config.toml and auth.json inside it.

Create configuration files

  1. Fill in configuration (replace sk-xxx with your real key).

a. Configuration in auth.json:

json
{"OPENAI_API_KEY": "sk-xxx"}

b. Configuration in config.toml (paste the content below):

model_reasoning_effort can be high, medium, or low for how much effort the model spends reasoning (high, medium, low).

toml
model_provider = "api111"
model = "gpt-5-codex"
model_reasoning_effort = "high"
disable_response_storage = true
preferred_auth_method = "apikey"

[model_providers.api111]
name = "api111"
base_url = "https://fast-token.com/v1"
wire_api = "responses"

Start codex

Restart the terminal! Restart the terminal! Restart the terminal!

Then go to your project directory:

bash
cd your-project-folder

Run:

bash
codex

Start codex

VSCode codex extension

After the configuration above, search for and install codex in the VSCode Extensions marketplace.

Install VSCode extension

It appears in the sidebar after installation.

Extension sidebar

Mac guide

System requirements

  • macOS 12 or later
  • Node.js 22+
  • npm 10+
  • Network connection

Installation steps

1. Install Node.js

  • Option 1: Visit the Node.js website to download and install the latest LTS version.
  • Option 2: Use Homebrew (recommended)
bash
# If Homebrew is not installed, run this first
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install Node.js
brew install node

2. Install codex

Open Terminal and run (you may need sudo):

bash
npm install -g @openai/codex

3. Verify installation

Open Terminal and run:

bash
codex --version

Configure API

1. Get Auth Token

Visit the Fast-Token platform and:

  • Go to Console → API Tokens
  • Click Add token
  • Token group: select codex特供 (you must select this group or Codex will not work)
  • Token name: any
  • Quota: recommended unlimited
  • Leave other options at default

Create API token

2. Configuration files

Important: Replace sk-xxx below with the actual API key you generated on the Fast-Token platform.

  1. Create the directory and files:
bash
mkdir -p ~/.codex
touch ~/.codex/auth.json
touch ~/.codex/config.toml
  1. Edit auth.json:
bash
vi ~/.codex/auth.json

Press i to enter insert mode, paste the following (replace sk-xxx with your key), then press ESC, type :wq, and press Enter to save and exit.

json
{ "OPENAI_API_KEY": "sk-xxx" }
  1. Edit config.toml:
bash
vi ~/.codex/config.toml

Press i to enter insert mode, paste the following, then press ESC, type :wq, and press Enter to save and exit.

toml
model_provider = "api111"
model = "gpt-5-codex"
model_reasoning_effort = "high"
disable_response_storage = true
preferred_auth_method = "apikey"

[model_providers.api111]
name = "api111"
base_url = "https://fast-token.com/v1"
wire_api = "responses"

Start codex

Restart the terminal! Restart the terminal! Restart the terminal!

Then go to your project directory:

bash
cd your-project-folder

Run:

bash
codex

Start codex

VSCode codex extension

After the configuration above, search for and install codex in the VSCode Extensions marketplace.

Install VSCode extension

It appears in the sidebar after installation.

Extension sidebar

Linux guide

System requirements

  • Mainstream Linux distributions (Ubuntu 20.04+, Debian 10+, CentOS 7+, etc.)
  • Node.js 22+
  • npm 10+
  • Network connection

Installation steps

1. Install Node.js

  • Ubuntu/Debian
bash
sudo apt update
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs
  • CentOS/RHEL/Fedora
bash
# Use dnf (Fedora) or yum (CentOS/RHEL)
sudo dnf install nodejs npm
# or
sudo yum install nodejs npm
  • Arch Linux
bash
sudo pacman -S nodejs npm

2. Install codex

Open Terminal and run:

bash
sudo npm install -g @openai/codex

3. Verify installation

Open Terminal and run:

bash
codex --version

Configure API

1. Get Auth Token

Visit the Fast-Token platform and:

  • Go to Console → API Tokens
  • Click Add token
  • Token group: select codex渠道-gpt (you must select this group or Codex will not work)
  • Token name: any
  • Quota: recommended unlimited
  • Leave other options at default

Create API token

2. Configuration files

Important: Replace sk-xxx below with the actual API key you generated on the Fast-Token platform.

  1. Create the directory and files:
bash
mkdir -p ~/.codex
touch ~/.codex/auth.json
touch ~/.codex/config.toml
  1. Edit auth.json:
bash
vi ~/.codex/auth.json

Press i to enter insert mode, paste the following (replace sk-xxx with your key), then press ESC, type :wq, and press Enter to save and exit.

json
{ "OPENAI_API_KEY": "sk-xxx" }
  1. Edit config.toml:
bash
vi ~/.codex/config.toml

Press i to enter insert mode, paste the following, then press ESC, type :wq, and press Enter to save and exit.

toml
model_provider = "api111"
model = "gpt-5-codex"
model_reasoning_effort = "high"
disable_response_storage = true
preferred_auth_method = "apikey"

[model_providers.api111]
name = "api111"
base_url = "https://fast-token.com/v1"
wire_api = "responses"

Start codex

Restart the terminal! Restart the terminal! Restart the terminal!

Then go to your project directory:

bash
cd your-project-folder

Run:

bash
codex

Start codex

VSCode codex extension

After the configuration above, search for and install codex in the VSCode Extensions marketplace.

Install VSCode extension

It appears in the sidebar after installation.

Extension sidebar

FAQ

If you see errors, troubleshoot in this order:

  1. Confirm the API Key was created correctly: quota set to unlimited, do not restrict models, and group set to codex渠道-gpt.

For more Codex configuration and usage details, see the official Codex tutorial.