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:
npm install -g @openai/codex3. Verify installation
Open Command Prompt (CMD) or PowerShell and run:
codex --versionConfigure 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
2. Configuration files
Important: Replace
sk-xxxbelow with the actual API key you generated on the Fast-Token platform.
- Open the
.codexfolder 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.)
- If there is no
.codexfolder, create it manually, then createconfig.tomlandauth.jsoninside it.
- Fill in configuration (replace
sk-xxxwith your real key).
a. Configuration in auth.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).
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:
cd your-project-folderRun:
codexVSCode codex extension
After the configuration above, search for and install codex in the VSCode Extensions marketplace.
It appears in the sidebar after installation.
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)
# 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 node2. Install codex
Open Terminal and run (you may need sudo):
npm install -g @openai/codex3. Verify installation
Open Terminal and run:
codex --versionConfigure 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
2. Configuration files
Important: Replace
sk-xxxbelow with the actual API key you generated on the Fast-Token platform.
- Create the directory and files:
mkdir -p ~/.codex
touch ~/.codex/auth.json
touch ~/.codex/config.toml- Edit
auth.json:
vi ~/.codex/auth.jsonPress 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.
{ "OPENAI_API_KEY": "sk-xxx" }- Edit
config.toml:
vi ~/.codex/config.tomlPress i to enter insert mode, paste the following, then press ESC, type :wq, and press Enter to save and exit.
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:
cd your-project-folderRun:
codexVSCode codex extension
After the configuration above, search for and install codex in the VSCode Extensions marketplace.
It appears in the sidebar after installation.
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
sudo apt update
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs- CentOS/RHEL/Fedora
# Use dnf (Fedora) or yum (CentOS/RHEL)
sudo dnf install nodejs npm
# or
sudo yum install nodejs npm- Arch Linux
sudo pacman -S nodejs npm2. Install codex
Open Terminal and run:
sudo npm install -g @openai/codex3. Verify installation
Open Terminal and run:
codex --versionConfigure 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
2. Configuration files
Important: Replace
sk-xxxbelow with the actual API key you generated on the Fast-Token platform.
- Create the directory and files:
mkdir -p ~/.codex
touch ~/.codex/auth.json
touch ~/.codex/config.toml- Edit
auth.json:
vi ~/.codex/auth.jsonPress 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.
{ "OPENAI_API_KEY": "sk-xxx" }- Edit
config.toml:
vi ~/.codex/config.tomlPress i to enter insert mode, paste the following, then press ESC, type :wq, and press Enter to save and exit.
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:
cd your-project-folderRun:
codexVSCode codex extension
After the configuration above, search for and install codex in the VSCode Extensions marketplace.
It appears in the sidebar after installation.
FAQ
If you see errors, troubleshoot in this order:
- 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.