元渊 API元渊 API
Deployment Guide

CodeX Deployment Guide

Enterprise-grade AI coding assistant deployment guide

Prerequisites

CodeX is a next-generation intelligent programming assistant based on the GPT-5 architecture, providing developers with exceptional code generation and optimization capabilities.

Deployment Path: System environment setup ➜ CLI tool installation ➜ API integration ➜ Development environment ready

Prerequisite

Before configuring CodeX with CC-Switch, ensure you have globally installed the CodeX tool via npm:

npm install -g @openai/codex@latest

Verify installation: codex --version

We recommend using the CC-Switch configuration tool for graphical configuration — simple and quick with no command line needed.

Configuration Steps

Launch CC-Switch and Switch to the Codex Tab

  1. Open the CC-Switch application
  2. Click the "Codex" tab at the top
  3. Click the orange "+" button in the upper right corner to add a new configuration

Fill in CodeX Provider Configuration

  1. Provider Name: Custom name (e.g., "元渊智能")
  2. Base URL: Enter https://api.ai.soraliststudio.com/v1
  3. API Key: Paste your CodeX-specific token from the 元渊智能 platform (codex test token group)
  4. Model: Select gpt-5-codex
  5. Other settings: Adjust reasoning intensity, network access, etc., as needed
  6. Click "Save"
  • CC-Switch will automatically create ~/.codex/config.toml and auth.json files
  • You can add multiple provider configurations and switch between them anytime
  • After switching, close and restart CodeX for changes to take effect

Enable Configuration

  1. Find the "元渊智能" configuration you just created
  2. Click the "Currently Used" button on the right side
  3. The configuration will be marked as "Currently Used" (green label)
  4. Restart CodeX for the new configuration to take effect

System Tray Quick Switch

CC-Switch supports quick CodeX configuration switching via the system tray:

  • Right-click the CC-Switch icon in the system tray
  • Select the Codex category from the menu
  • Directly select the configuration to switch to
  • Configuration takes effect immediately
  • Make sure to create a dedicated key from the "codex test" token group on the 元渊智能 platform
  • CodeX tokens are not interchangeable with Claude Code tokens
  • You need to restart CodeX after switching configurations
  • You can test API endpoint speed in CC-Switch

Manual Command Line Configuration

If you don't use CC-Switch, follow these steps to manually configure CodeX.

Step 1: Deploy the CodeX CLI Tool

Launch Command Prompt or PowerShell with administrator privileges:

npm install -g @openai/codex@latest
codex --version

Step 2: Integrate 元渊智能 API Service

Obtain your API credentials:

  1. Visit the 元渊智能 developer console
  2. Register or log in to your account
  3. Navigate to the "API Key Management" module
  4. When creating a new key, select the "codex test" token group
  5. Securely save the generated API Key

Security Reminder

CodeX requires an independent token group configuration, completely isolated from the Claude Code token system.

Build the configuration directory:

mkdir %USERPROFILE%\.codex
cd %USERPROFILE%\.codex

Create the configuration file config.toml:

model_provider = "yyzn"
model = "gpt-5.2-codex"
model_reasoning_effort = "xhigh"
network_access = "enabled"
disable_response_storage = true
approval_policy = "on-request"
web_search = "live"
sandbox_mode = "danger-full-access"
collaboration_mode = true
model_supports_reasoning_summaries = true

[model_providers.yyzn]
name = "yyzn"
base_url = "https://api.ai.soraliststudio.com/v1"
wire_api = "responses"
requires_openai_auth = true

[features]
shell_snapshot = true
collab = false
collaboration_modes = false
steer = false
unified_exec = false

Create the authentication file auth.json:

{
  "OPENAI_API_KEY": "Paste your CodeX-specific token here"
}

Step 3: Initialize Workspace

mkdir my-codex-project
cd my-codex-project
codex

Deploy CodeX Tool

npm install -g @openai/codex@latest
codex --version

Integrate API Service

Create configuration directory:

mkdir -p ~/.codex
cd ~/.codex

Create config.toml:

cat > config.toml << 'EOF'
model_provider = "yyzn"
model = "gpt-5.2-codex"
model_reasoning_effort = "xhigh"
network_access = "enabled"
disable_response_storage = true
approval_policy = "on-request"
web_search = "live"
sandbox_mode = "danger-full-access"
collaboration_mode = true
model_supports_reasoning_summaries = true

[model_providers.yyzn]
name = "yyzn"
base_url = "https://api.ai.soraliststudio.com/v1"
wire_api = "responses"
requires_openai_auth = true

[features]
shell_snapshot = true
collab = false
collaboration_modes = false
steer = false
unified_exec = false
EOF

Create auth.json:

cat > auth.json << 'EOF'
{
  "OPENAI_API_KEY": "Paste your CodeX-specific token here"
}
EOF

Initialize Workspace

mkdir my-codex-project
cd my-codex-project
codex

Deploy CodeX Tool

sudo npm install -g @openai/codex@latest
codex --version

Integrate API Service

Create configuration directory:

mkdir -p ~/.codex
cd ~/.codex

Create config.toml:

cat > config.toml << 'EOF'
model_provider = "yyzn"
model = "gpt-5.2-codex"
model_reasoning_effort = "xhigh"
network_access = "enabled"
disable_response_storage = true
approval_policy = "on-request"
web_search = "live"
sandbox_mode = "danger-full-access"
collaboration_mode = true
model_supports_reasoning_summaries = true

[model_providers.yyzn]
name = "yyzn"
base_url = "https://api.ai.soraliststudio.com/v1"
wire_api = "responses"
requires_openai_auth = true

[features]
shell_snapshot = true
collab = false
collaboration_modes = false
steer = false
unified_exec = false
EOF

Create auth.json:

cat > auth.json << 'EOF'
{
  "OPENAI_API_KEY": "Paste your CodeX-specific token here"
}
EOF

Initialize Workspace

mkdir my-codex-project
cd my-codex-project
codex

FAQ

Are CodeX and Claude Code tokens interchangeable?

No, they use different token groups:

  • Claude Code: Uses the Claude Code token group
  • CodeX: Uses the "codex test" token group

Please create dedicated tokens on the 元渊智能 platform.

Where are configuration files located?

  • Windows: %USERPROFILE%\.codex\
  • macOS/Linux: ~/.codex/

How is this guide?