How the integration works
Current Codex clients use the Responses API for agentic tool loops. Configure a user-level custom provider, load the maintained model catalog, and keep the DeepSeek-V4.io API key in an environment variable.
Create and manage it on /developer.
The client talks to its native compatible endpoint.
Provider credentials and routing stay on the server.
Before you start
- Codex CLI 0.144.0 or newer
- A paid DeepSeek-V4.io account with an API key from /developer
- User-level access to ~/.codex/config.toml
Configure Codex
Copy the printed absolute path into the next snippet. Codex requires an absolute model_catalog_json path and does not reliably expand ~ here.
CODEX_HOME_DIR="${CODEX_HOME:-$HOME/.codex}"
mkdir -p "$CODEX_HOME_DIR"
curl -fsSL https://deepseek-v4.io/codex/models.json -o "$CODEX_HOME_DIR/models.json"
printf 'Catalog path: %s\n' "$CODEX_HOME_DIR/models.json"model = "deepseek-v4-flash"
model_provider = "deepseek_v4"
model_reasoning_effort = "high"
model_catalog_json = "/absolute/path/to/.codex/models.json"
[model_providers.deepseek_v4]
name = "DeepSeek-V4.io"
base_url = "https://deepseek-v4.io/api/v1"
env_key = "DEEPSEEK_V4_API_KEY"
wire_api = "responses"export DEEPSEEK_V4_API_KEY="your-deepseek-v4-io-key"
cd /path/to/your/project
codexPrefer to inspect the file first? Open the maintained models.json before downloading it.
Verify the setup
Verified against the public DeepSeek-V4.io gateway with Codex 0.147.0-alpha.1.2 on 2026-08-12.
- 1Confirm the startup banner shows deepseek-v4-flash.
- 2Ask Codex to read a file with a tool and summarize it without editing.
- 3Complete a full Responses tool loop: function call, tool result, follow-up request, and final answer.
Troubleshooting
Provider configuration is ignored
Put model_provider and model_providers in ~/.codex/config.toml. Codex ignores provider definitions in project-local .codex/config.toml files.
Codex asks for an OpenAI login
Confirm the provider id is deepseek_v4 and env_key is present under [model_providers.deepseek_v4]. Custom providers do not require OpenAI authentication by default.
Model metadata is missing
Download /codex/models.json and paste the printed absolute catalog path into model_catalog_json. Do not use ~ or a project-relative path.
The official guide mentions Moon Bridge
DeepSeek's generic Codex guide uses a forwarding layer because Codex requires the Responses API. DeepSeek-V4.io already exposes /api/v1/responses, so this gateway-specific setup connects Codex directly.
Sources and support boundary
Configuration fields are checked against the tool publisher's documentation. DeepSeek-V4.io owns this gateway guide and support for its endpoint; it does not represent the tool publisher.
Ready to connect Codex?
Create a DeepSeek-V4.io API key, copy the configuration above, and verify one read-only tool call before using it on a real project.