Integrating Codex with CodingPlanX Custom Models
Configure the OpenAI Codex CLI using your CodingPlanX.ai API Key.
Codex Integration Guide
CodingPlanX.ai supports not only Claude Code but also the OpenAI Codex CLI. Once you purchase a plan, Claude Code and Codex share the same plan quota, giving you the flexibility to choose the tool you prefer.
Install Codex CLI
npm install -g @openai/codex
Verify the installation:
codex --version
Latest Version: v0.114.0 (2026-03-11), featuring the Skills system, Hooks engine, and more.
Available Models
You can access the following Codex/GPT models via CodingPlanX.ai:
| Model | Description |
|---|---|
gpt-5.3-codex-spark | Latest recommended, Default model |
gpt-5.2-codex | Stable version |
gpt-5.2-2025-12-11 | GPT-5.2 Base version |
gpt-5.1-codex-max | High-performance version |
gpt-5.1-codex | Standard version |
All models share your CodingPlanX.ai plan quota with Claude Code.
Configuration Overview
Codex CLI requires two configuration files:
~/.codex/config.toml- Service configuration~/.codex/auth.json- Authentication configuration
Windows Configuration
Step 1: Create Configuration Directory
mkdir %HOMEPATH%\.codex
Step 2: Create config.toml
Create the configuration file at ~/.codex/config.toml:
model_provider = "crs"
model = "gpt-5.3-codex-spark"
model_reasoning_effort = "high"
disable_response_storage = true
preferred_auth_method = "apikey"
[model_providers.crs]
name = "crs"
base_url = "https://api.codingplanx.ai/v1"
wire_api = "responses"
requires_openai_auth = true
env_key = "CRS_OAI_KEY"
Step 3: Create auth.json
Create the authentication file at ~/.codex/auth.json:
{
"OPENAI_API_KEY": "cr_xxxxxxxxxx"
}
Replace
cr_xxxxxxxxxxwith your CodingPlanX.ai API Key.
Step 4: Set Environment Variables (Optional)
If you prefer to provide your key via environment variables:
# Temporary setup
$env:CRS_OAI_KEY = "cr_xxxxxxxxxx"
# Permanent setup
[System.Environment]::SetEnvironmentVariable("CRS_OAI_KEY", "cr_xxxxxxxxxx", [System.EnvironmentVariableTarget]::User)
Then set OPENAI_API_KEY to null in your auth.json.
macOS Configuration
Step 1: Create Configuration Directory
mkdir -p ~/.codex
Step 2: Create config.toml
cat > ~/.codex/config.toml << 'EOF'
model_provider = "crs"
model = "gpt-5.3-codex-spark"
model_reasoning_effort = "high"
disable_response_storage = true
preferred_auth_method = "apikey"
[model_providers.crs]
name = "crs"
base_url = "https://api.codingplanx.ai/v1"
wire_api = "responses"
requires_openai_auth = true
env_key = "CRS_OAI_KEY"
EOF
Step 3: Create auth.json
cat > ~/.codex/auth.json << 'EOF'
{
"OPENAI_API_KEY": "cr_xxxxxxxxxx"
}
EOF
Replace
cr_xxxxxxxxxxwith your CodingPlanX.ai API Key.
Step 4: Set Environment Variables (Optional)
If you prefer to provide your key via environment variables:
# Temporary setup
export CRS_OAI_KEY="cr_xxxxxxxxxx"
# Permanent setup
echo 'export CRS_OAI_KEY="cr_xxxxxxxxxx"' >> ~/.zshrc
source ~/.zshrc
Then set OPENAI_API_KEY to null in your auth.json.
Linux Configuration
Step 1: Create Configuration Directory
mkdir -p ~/.codex
Step 2: Create config.toml
cat > ~/.codex/config.toml << 'EOF'
model_provider = "crs"
model = "gpt-5.3-codex-spark"
model_reasoning_effort = "high"
disable_response_storage = true
preferred_auth_method = "apikey"
[model_providers.crs]
name = "crs"
base_url = "https://api.codingplanx.ai/v1"
wire_api = "responses"
requires_openai_auth = true
env_key = "CRS_OAI_KEY"
EOF
Step 3: Create auth.json
cat > ~/.codex/auth.json << 'EOF'
{
"OPENAI_API_KEY": "cr_xxxxxxxxxx"
}
EOF
Replace
cr_xxxxxxxxxxwith your CodingPlanX.ai API Key.
Step 4: Set Environment Variables (Optional)
If you prefer to provide your key via environment variables:
# Temporary setup
export CRS_OAI_KEY="cr_xxxxxxxxxx"
# Permanent setup (Bash)
echo 'export CRS_OAI_KEY="cr_xxxxxxxxxx"' >> ~/.bashrc
source ~/.bashrc
# Permanent setup (Zsh)
echo 'export CRS_OAI_KEY="cr_xxxxxxxxxx"' >> ~/.zshrc
source ~/.zshrc
Then set OPENAI_API_KEY to null in your auth.json.
Verify Configuration
After configuring, run the Codex CLI to verify:
codex
Success Indicators
- Codex starts normally and connects to the service.
- You can generate code and receive AI responses.
- Network requests are properly routed through the CodingPlanX.ai proxy.
FAQ / Troubleshooting
Configuration File Not Found
Issue: Codex prompts that the configuration file cannot be found.
Solution:
- Check if the configuration path is correct.
- Ensure the
~/.codex/directory exists. - Verify that both
config.tomlandauth.jsonare present.
API Key Authentication Failed
Issue: Invalid environment variable or incorrect API key.
Solution:
- Check if the
CRS_OAI_KEYenvironment variable is set correctly. - Verify your API key format (starts with
cr_). - Ensure the key is not expired by checking the Console.
Network Connection Issues
Issue: Unable to connect to CodingPlanX.ai services.
Solution:
- Check your internet connection.
- Verify that
base_urlis properly set tohttps://api.codingplanx.ai.