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:

ModelDescription
gpt-5.3-codex-sparkLatest recommended, Default model
gpt-5.2-codexStable version
gpt-5.2-2025-12-11GPT-5.2 Base version
gpt-5.1-codex-maxHigh-performance version
gpt-5.1-codexStandard 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_xxxxxxxxxx with 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_xxxxxxxxxx with 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_xxxxxxxxxx with 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:

  1. Check if the configuration path is correct.
  2. Ensure the ~/.codex/ directory exists.
  3. Verify that both config.toml and auth.json are present.

API Key Authentication Failed

Issue: Invalid environment variable or incorrect API key.

Solution:

  1. Check if the CRS_OAI_KEY environment variable is set correctly.
  2. Verify your API key format (starts with cr_).
  3. Ensure the key is not expired by checking the Console.

Network Connection Issues

Issue: Unable to connect to CodingPlanX.ai services.

Solution:

  1. Check your internet connection.
  2. Verify that base_url is properly set to https://api.codingplanx.ai.