Ultimate Guide: Connect DeepSeek Official API to Codex Using the V4 Flash Model
Support Content
## A. 准备环节
> 1.1 deepseek apikey // 保护好你的 Key 不要公开
```
sk-d305adf74f764e3799ed6ffdbe6f1be66
```
> 1.2 auth.json // 保持给出的结构。
```
{
"auth_mode": "apikey",
"OPENAI_API_KEY": "sk-d305adf74f764e3799ed6ffdbe6f1be66"
}
```
> 1.3 config.toml // 替换给出的关键内容。
```
model_provider = "DPWorking"
model = "deepseek-v4-flash"
model_reasoning_effort = "high"
...
model_catalog_json = "deepseek-models.json"
[model_providers.DPWorking]
name = "OpenAI"
wire_api = "responses"
requires_openai_auth = true
base_url = "https://api.deepseek.com/v1"
experimental_bearer_token = "sk-d305adf74f764e3799ed6ffdbe6f1be66"
```
> 1.4 deepseek-models.json // 全量复制
```
https://pan.quark.cn/s/024b75d4762b
```
```
https://r-dpit.lib00.com/files/802.4.15.5.101.32/deepseek-models.json.zip
```
```
https://api-docs.deepseek.com/zh-cn/quick_start/agent_integrations/codex#%E6%96%B9%E5%BC%8F%E4%BA%8C%E6%89%8B%E5%8A%A8%E7%BC%96%E8%BE%91%E9%85%8D%E7%BD%AE%E6%96%87%E4%BB%B6
```
## B. refs
> 2.1 deepseek 开放平台
```
https://platform.deepseek.com/
```
> 2.2 deepseek API docs
```
https://api-docs.deepseek.com/zh-cn/
```
Summary Content
# Ultimate Guide: Connect DeepSeek Official API to Codex Using the V4 Flash Model
## 🎯 Video Overview
With DeepSeek officially supporting OpenAI-compatible APIs, developers now have more integration possibilities than ever. In this video, tech channel host DP delivers a comprehensive, step-by-step tutorial on **how to integrate the DeepSeek V4 Flash official API into Codex**. This robust integration significantly lowers the barrier to entry for using Codex and sets an excellent foundation for utilizing future LLMs in AI-assisted programming.
---
## 🛠️ Core Preparations
Before diving into configurations, the following prerequisites must be met:
1. **Acquire an API Key**: Visit the official DeepSeek Open Platform to generate an API Key. **Always keep this key private and secure**.
2. **Account Balance Check**: DeepSeek's API operates on a prepaid model. Ensure your account has sufficient balance before attempting any API calls.
3. **Download Mapping Files**: Retrieve the required models configuration file (`deepseek-models.json`) via the links provided in the host's companion article or cloud drive.
---
## 📝 Configuration Guide
The magic happens inside the `.Codex` hidden folder located in your user root directory. You need to modify the following configuration files:
- **auth.json**: Open this file and simply replace the placeholder with your new DeepSeek API Key.
- **config.toml**: This is the crucial step. Update the `provider` name (e.g., set to DPWorking), specify the `model` as `Deepseek V4 Flash`, set the API `URL` to DeepSeek's endpoint, and synchronize your API key here again. Other settings in this file can remain untouched.
- **deepseek-models.json**: Place this extracted file directly into the root of the `.Codex` directory (no subfolders) and ensure the correct model mapping text is applied.
---
## 💻 Live Testing & Cost Analysis
### VSCode CLI Testing
Once configured, simply open the command line in any VSCode project folder and start Codex:
- **Seamless Switching**: The system correctly lists the `Flash` and `Pro` models. The V4 Flash model is recommended for its vastly superior compatibility with Codex.
- **Execution Quality**: Voice hook prompts work smoothly. Codex accurately captures instructions and executes background coding tasks flawlessly.
- **Ultra-Low Cost**: Code generation is extremely cheap. The host verifies that a single intensive API task run costs roughly **0.02**, showcasing the cost-effectiveness of DeepSeek.
### Codex Desktop App Testing
When running the exact same configuration via the Codex GUI application, the model displays as `Custom`. Although the "Reasoning Effort" slider mapping remains ambiguous in the UI, the task generation and underlying logic continue to execute correctly without breaking a sweat.
---
## 💡 Conclusion & Outlook
This is a highly successful and valuable experiment. By leveraging API compatibility, the integration **drastically reduces the financial and technical barrier of using Codex**. Furthermore, this setup process serves as a blueprint for easily hooking up other major AI models in the future. For any developer interested in streamlined AI programming, this is a must-try experience!
Related Contents
OpenAI Codex Quota Anomalies R...
Duration: 00:00 | DPCodex & GPT-5.6 Slow Response ...
Duration: 00:00 | DPGoogle Gemini 3.5 Pro Leaks & ...
Duration: 00:00 | DPGrok 4.5 Practical Review: A P...
Duration: 00:00 | DPGoogle Gemini 3.6 Flash Free M...
Duration: 00:00 | DPGPT-5.6 Ultimate Guide: 7 Hidd...
Duration: 00:00 | DPGPT 5. 6 Released: Temporary F...
Duration: 00:00 | DPIn-Depth Analysis of OpenAI GP...
Duration: 00:00 | DPUncovering the Reason Behind O...
Duration: 00:00 | DPHow to Disable Automatic API R...
Duration: 00:00 | DPCodex Destroying Your SSD? 3 S...
Duration: 00:00 | DPAI Subscription Saver: A Deep ...
Duration: 00:00 | DPCodex Subscription Plans Expla...
Duration: 00:00 | DPThe Ultimate Guide to Recoveri...
Duration: 00:00 | DPAntigravity Quota Skyrockets 9...
Duration: 00:00 | DPDeep Dive into Google I/O 2026...
Duration: 00:00 | DPCodex Hooks Tutorial for Begin...
Duration: 00:00 | DPAntigravity Disable Auto-Updat...
Duration: 00:00 | DPThe Ultimate Guide to Fixing t...
Duration: 00:00 | DPUnlocking Your 'Jarvis' Moment...
Duration: 00:00 | DPCodex Skill Beginner's Guide: ...
Duration: 00:00 | DPThe Ultimate Codex AI Cache Cl...
Duration: 00:00 | DPMajor Codex Subscription Shake...
Duration: 00:00 | DPOpenAI's Shocking Offer: Get $...
Duration: 00:00 | DPRecommended
Starsector 0.98 Chinese Versio...
06:40 | 261Starsector Online Tools Website (https://sst.lib00...
Configure ACL Firewall for IPv...
14:26 | 521This video demonstrates how to achieve precise acc...
Synology 7.2 Jellyfin Upgrade ...
13:06 | 577Based on the N5105 CPU Synology DSM 7.2.1 system, ...
Starsector 0.98 Chinese 97%+ v...
04:02 | 535Starsector Online Tools Website (https://sst.lib00...