Skip to content

DeepSeek Setup

Get API Key

  1. Visit DeepSeek Platform
  2. Sign up and log in
  3. Go to API Keys page
  4. Create a new API Key

How It Works

CCX supports multiple protocol endpoints for DeepSeek:

text
Claude Code CLI       ──→  /v1/messages          ──→  CCX  ──→  DeepSeek Anthropic endpoint
Codex CLI/App         ──→  /v1/responses         ──→  CCX  ──→  DeepSeek Chat endpoint
OpenAI-compatible app ──→  /v1/chat/completions  ──→  CCX  ──→  DeepSeek Chat endpoint

A single CCX instance serves all paths simultaneously.

Scenario 1: OpenAI Chat Protocol (General)

For any tool compatible with OpenAI Chat protocol.

Configuration

  1. Go to CCX admin console, select Chat endpoint
  2. Click "Add Channel"
  3. Fill in:
FieldValue
Service TypeOpenAI Chat
NameDeepSeek Chat
Base URLhttps://api.deepseek.com
API KeysYour DeepSeek API Key
Modelsdeepseek-v4-pro, deepseek-v4-flash

Client Configuration

bash
export OPENAI_API_KEY="your-ccx-proxy-key"
export OPENAI_BASE_URL="http://localhost:3000/v1"

Scenario 2: Claude Code CLI

Claude Code CLI uses the Messages API. Configure a Claude service type channel pointing to DeepSeek's Anthropic-compatible endpoint.

Configuration

  1. Go to CCX admin console, select Messages endpoint
  2. Click "Add Channel"
  3. Fill in:
FieldValue
Service TypeClaude
NameDeepSeek Claude
Base URLhttps://api.deepseek.com/anthropic
API KeysYour DeepSeek API Key
Modelsdeepseek-v4-pro, deepseek-v4-flash

Claude Code CLI sends requests with Claude model names (e.g., claude-opus-4-7). Configure model mapping for automatic redirection:

Request ModelRedirects To
opusdeepseek-v4-pro
sonnetdeepseek-v4-pro
haikudeepseek-v4-flash

Client Configuration

bash
export ANTHROPIC_API_KEY="your-ccx-proxy-key"
export ANTHROPIC_BASE_URL="http://localhost:3000"

WARNING

ANTHROPIC_BASE_URL should point to the CCX gateway root — do not append /v1 or /v1/messages.


Scenario 3: Codex CLI / App

Codex CLI uses the OpenAI Responses API. Configure a Chat service type channel under the Responses endpoint.

Configuration

  1. Go to CCX admin console, select Responses endpoint
  2. Click "Add Channel"
  3. Fill in:
FieldValue
Service TypeOpenAI Chat
NameDeepSeek Chat
Base URLhttps://api.deepseek.com
API KeysYour DeepSeek API Key
Modelsdeepseek-v4-pro, deepseek-v4-flash
  1. After saving, edit the channel and enable Normalize Non-standard Chat Roles

Why enable this?

After Codex Responses requests are converted to Chat Completions, they may contain roles like developer that DeepSeek doesn't support. This option normalizes them to user before sending upstream.

Request ModelRedirects To
gptdeepseek-v4-pro
minideepseek-v4-flash

CCX uses the longest matching key first. gpt matches gpt-5, while mini matches gpt-5-mini.

Client Configuration

Codex CLI:

bash
export OPENAI_API_KEY="your-ccx-proxy-key"
export OPENAI_BASE_URL="http://localhost:3000/v1"
codex "hello"

Codex App (VS Code / JetBrains):

SettingValue
API Keyyour-ccx-proxy-key
Base URLhttp://localhost:3000/v1
Modelgpt-5 (CCX redirects to deepseek-v4-pro)

Available Models

ModelDescription
deepseek-v4-proDeepSeek-V4 Pro flagship model
deepseek-v4-flashDeepSeek-V4 Flash fast model
deepseek-chatDeepSeek-V3 general chat (legacy)
deepseek-reasonerDeepSeek-R1 reasoning model

Verify Configuration

bash
curl http://localhost:3000/v1/models \
  -H "Authorization: Bearer your-ccx-proxy-key"

Troubleshooting

IssueSolution
401 UnauthorizedVerify the key matches CCX's PROXY_ACCESS_KEY
Model not foundCheck model names in channel config
Connection refusedConfirm CCX is running and Base URL is correct
Channel unhealthyCheck DeepSeek API Key and network access to api.deepseek.com
Claude Code format errorEnsure ANTHROPIC_BASE_URL points to root, not /v1