Complete Guide to Connecting DeepSeek V4 Pro with Codex and Claude Code
Complete Guide to Connecting DeepSeek …
How to connect DeepSeek V4 Pro's low-cost API to Codex and Claude Code for budget-friendly AI programming.
This guide walks through installing Codex and Claude Code on desktop and integrating DeepSeek V4 Pro's heavily discounted API via Codex++ and CC Switch. Real-world tests show completing tasks like a Snake game costs mere cents, with Codex being more token-efficient while Claude Code delivers higher quality output. The article recommends using both tools strategically based on project complexity.
Introduction: Saving Money on AI Programming Tools
After DeepSeek announced a permanent 75% discount on its V4 Pro model API, the cost barrier for Vibe Coding has dropped even further. Vibe Coding is a concept proposed by former Tesla AI Director Andrej Karpathy in early 2025, referring to a new development paradigm where developers describe requirements in natural language and let AI programming Agents automatically generate code. Unlike traditional programming, Vibe Coding emphasizes "if it feels right, it's good enough" — developers primarily serve as requirement describers and code reviewers rather than writing code line by line. The adoption of this paradigm is highly dependent on the cost of large model API calls, so every API price reduction directly drives the democratization of Vibe Coding.
For developers who regularly use Codex and Claude Code for AI-assisted programming, connecting third-party low-cost APIs to these mainstream programming Agents is a practical solution that balances quality and cost.
This article provides a detailed guide on how to install Codex and Claude Code on desktop, complete the DeepSeek V4 Pro API integration, and shares real-world Token consumption and cost data to help you make the optimal choice.
Codex vs Claude Code: Which Should You Choose?
Before getting started, let's clarify the positioning differences between these two tools. Codex is a programming Agent tool launched by OpenAI, originally derived from the code generation capabilities of the GPT series models. After multiple iterations, it evolved into a standalone desktop product with built-in code execution sandbox and project management features. Claude Code is a command-line programming assistant launched by Anthropic, built on the Claude series models, renowned for its outstanding performance in long-context understanding, code refactoring, and architecture design. The two respectively represent OpenAI's and Anthropic's core product strategies in the AI programming space.
- Codex: Better suited for beginners, with user-friendly feature design and relatively conservative Token consumption, ideal for daily lightweight programming tasks.
- Claude Code: Suited for professional developers or users with higher quality requirements for their projects, offering superior interaction design and code structure output quality, but with noticeably higher Token consumption.
The best practice is to use both in combination — use Codex for simple tasks to control costs, and Claude Code for complex projects to ensure quality.
Codex Desktop Installation and DeepSeek API Integration
Installation Process
- Go to the OpenAI official website to download the Codex desktop client, install it and log in with your GPT account
- Find the open-source project Codex++ on GitHub (an enhanced shell that adds a management center to Codex)
- Input the GitHub link into Codex and let it automatically complete the project installation
- After installation, Windows will automatically create a desktop shortcut
Connecting DeepSeek V4 Pro
DeepSeek is a leading AI large model company in China. Its V4 Pro is a flagship code and reasoning model launched in 2025. Compared to its predecessor V3, V4 Pro shows significant improvements in code generation accuracy, long-context processing capability, and instruction-following ability, while supporting an ultra-long context window of up to 1M (approximately 1 million) Tokens. The 75%-off pricing strategy continues DeepSeek's consistent "value-for-money approach" — rapidly capturing API market share through extremely competitive pricing, a strategy particularly friendly to programming Agent scenarios that rely on heavy API usage.
Open the Codex++ management tool and configure as follows:
- Click "Provider Configuration" → "Add Provider"
- Select "Pure API Model" for the connection mode
- Enter the model name: DeepSeek V4 Pro
- Enter DeepSeek's API address for the Base URL
- Input your DeepSeek API Key
- Select "Chat Mode" for the upstream protocol — Chat Mode here refers to the OpenAI-compatible Chat Completions API format, which is the de facto standard protocol in the large model industry. Since OpenAI was the first to define the
/v1/chat/completionsinterface specification, virtually all third-party model providers (including DeepSeek, Moonshot, GLM, etc.) have chosen to be compatible with this format, allowing developers to call different providers' models through a unified interface, greatly reducing switching costs. DeepSeek API currently only supports Chat Mode and does not support Responses or other protocol formats. - After saving, click "Switch" to enable the DeepSeek model
Codex + DeepSeek Real-World Cost Test
Test data:
| Metric | Value |
|---|---|
| API Request Count | 21 |
| Total Token Consumption | ~418,799 |
| Input Cache Hits | 404,224 |
| Input Cache Misses | 5,408 |
| Output Tokens | 9,167 |
Cost per task:
- Bubble Sort + Complexity Explanation: 15K Tokens consumed, cost ¥0.04
- Snake Game: 26K Tokens consumed, cost ¥0.04
As you can see, thanks to the extremely high cache hit rate (~96.7%), actual costs are remarkably low. Here's an explanation of the cache hit mechanism: when processing requests, large model APIs save the KV Cache (key-value cache) corresponding to previously computed input Tokens. When subsequent requests share the same input prefix as previous requests (extremely common in multi-turn dialogue and programming Agent scenarios, since each request carries the complete conversation history), the system can directly reuse cached computation results without recalculating. Cache-hit Tokens are typically billed at 10%-25% of the normal input price, which is why despite total Token consumption reaching 410K, the actual cost remains extremely low — 96.7% of input Tokens hit the cache, requiring only minimal fees.
Claude Code Desktop Installation and DeepSeek API Integration
A Little-Known Entry Point
Many people don't know that Claude's official desktop app has a built-in Claude Code entry point. You don't need to open a terminal or install IDE plugins — you can use the full functionality directly from the desktop client.
Installation is simple: go to the Claude official website, download the desktop client, and install it.
Connecting DeepSeek via CC Switch
- Open CC Switch and click "Add Provider" in the top right corner
- Find the DeepSeek option (the request URL is pre-filled)
- Paste your API Key
- In advanced options, add the model ID:
DeepSeek V4 Pro 1M - Return to the main interface, select DeepSeek and click "Enable"
- Click "Test Model" to confirm the configuration is correct
Claude Code + DeepSeek Real-World Cost Test
Test data:
| Metric | Value |
|---|---|
| API Request Count | 25 |
| Total Token Consumption | ~568,565 |
| Input Cache Hits | 515,328 |
| Input Cache Misses | 39,550 |
| Output Tokens | 13,687 |
Cost per task:
- DeepSeek V4 vs V3 Differences Query (with web access): 11K Tokens consumed, cost ¥0.04
- Bubble Sort + Complexity Explanation: 18K Tokens consumed, cost ¥0.06
- Snake Game: 28K Tokens consumed, cost ¥0.11
Codex vs Claude Code Cost Comparison Analysis
Several conclusions can be drawn from the real-world test data:
Significant Token Consumption Differences
For the same bubble sort task, Codex consumed 15K Tokens while Claude Code consumed 18K Tokens; for the Snake game task, the numbers were 26K and 28K respectively. Claude Code is indeed more "generous" with Token usage. This difference primarily stems from their different prompt engineering strategies: Claude Code injects more detailed System Prompts with each request, containing richer code standards, project context, and output format requirements. Additionally, it retains more complete historical information in multi-turn dialogues, all of which increase input Token consumption. Furthermore, Claude Code tends to generate more thorough code comments and explanatory text, resulting in higher output Tokens as well.
Cost Differences Are Small but Notable
For the Snake game task, Codex cost ¥0.04 while Claude Code cost ¥0.11 — nearly a 3x difference. With long-term, high-frequency usage, this gap will be amplified.
Quality vs Cost Trade-off
Based on real-world testing feedback, Claude Code's output quality in interaction design and code structure is visibly superior to Codex. For production projects, spending a few extra cents for better code quality is worthwhile.
On Whether You Need Native Subscriptions
While DeepSeek V4 Pro's API pricing is extremely attractive, native subscriptions to ChatGPT and Claude still offer irreplaceable value:
- DeepSeek is better suited for: Long-running simple task processing, information queries, and similar scenarios
- Native subscription advantages: Access to advanced features like Codex Computer Use and Claude Cowork, plus top-tier model capabilities for office automation
Here's an explanation of these two advanced features. Codex Computer Use is a computer control capability launched by OpenAI for Codex that allows AI Agents to directly operate your desktop environment — including clicking buttons, filling forms, switching application windows, reading screen content, etc. It essentially lets AI "watch the screen and operate the computer" like a human, useful for automated testing, data entry, cross-application workflow orchestration, and similar scenarios. Claude Cowork is a collaborative programming feature launched by Anthropic that allows multiple Claude Code instances to work in parallel on different modules of the same project, using built-in coordination mechanisms to avoid code conflicts — similar to an AI development team collaborating simultaneously, significantly improving development efficiency for large projects. These features are currently only available to native subscribers and cannot be replicated through third-party APIs.
For users in China, there are third-party subscription services available that support payment via WeChat Pay for overseas subscriptions. When choosing such services, it's recommended to prioritize platforms with account-ban after-sales guarantees and stable service.
Conclusion
DeepSeek V4 Pro's 75%-off API has brought a substantial reduction in the cost of using AI programming tools. Through third-party tools like Codex++ and CC Switch, ordinary developers can easily connect low-cost APIs to mainstream programming Agents. Real-world testing shows that completing a small game development task costs only a few cents, making Vibe Coding truly an affordable productivity tool for everyone.
The recommendation is to flexibly switch based on project complexity: use the Codex + DeepSeek combination for daily practice and simple tasks to control costs, and use Claude Code for production projects and complex requirements to ensure output quality.
Key Takeaways
Related articles

Claude Code Desktop Status Capsule: An Open-Source Widget for Real-Time AI Coding Status Monitoring
An open-source desktop status capsule that monitors Claude Code's idle, working, and completed states in real time, with multi-conversation management, memos, and music control for developers.

GPT-5.2 Codex vs Opus 4.5 Hands-On: A Comprehensive Comparison of Coding Ability, Speed, and Developer Experience
Hands-on comparison of GPT-5.2 Codex vs Opus 4.5 across frontend generation, physics simulation, 3D scenes, and code refactoring, with practical selection advice.
Deep Dive into the Three AI Programmin…
Deep Dive into the Three AI Programming Frameworks: The Right Way to Do Specification-Driven Development
Deep dive into the three frameworks of Specification-Driven Development (SDD) for AI programming: Blueprint, Execution Flow, and Change Records — solving the problem of AI code going off the rails.