DeepSeek V4: The Developer's Guide to Flash and Pro

TL;DR
DeepSeek V4 developer guide: Flash vs Pro, pricing, OpenAI SDK setup with thinking mode and tool calling, and when to pick V4 over Claude or GPT.
Last updated: August 2, 2026
What Changed on August 2, 2026#
The V4 rollout itself is unchanged - Flash and Pro are still the two tiers, prices are unchanged - but two launch-era details are now history:
- The legacy endpoint names are gone.
deepseek-chatanddeepseek-reasonerstopped resolving on July 24, 2026 as scheduled. Any code still pointing at them now fails, and the fix is a one-line rename todeepseek-v4-flashordeepseek-v4-pro. The migration guide covers the cutover, including the post-deadline failure modes. - The V4 Pro launch discount ended. The 75 percent launch pricing expired May 31, 2026. The standing rates below were re-verified August 2, 2026 and are unchanged.
- The open-weights landscape moved past "cheapest." Kimi K3 (2.8T, open weights since July 27) and GLM5.2 now contest the same frontier-quality-at-low-price slot, and DeepSeek V4-Pro's 1.6T serving economics are covered in the V4 economics post and the open-weights showdown.
DeepSeek V4 Is Here, And It Is Not One Model#
DeepSeek dropped V4 over the weekend and the rollout is bigger than V3 was. Instead of a single flagship plus a reasoning sibling, V4 ships as a family. There is DeepSeek V4 Flash for everyday work and DeepSeek V4 Pro for the heavy lifting. Both models fold reasoning into the same checkpoint, both stretch the context window to one million tokens, and both undercut every closed frontier model on price by roughly an order of magnitude.
If you were already running DeepSeek R1 or V3 in production, V4 is a drop-in upgrade with one config change. If you were on Claude or GPT for cost-sensitive workloads, V4 is the model that finally makes the switch worth running the numbers on. We covered the launch on the channel in DeepSeek v4 in 4 Minutes, but the four-minute version skips the parts that matter when you actually wire it into an app. This is the longer take.
Official Sources#
Verify pricing, model specs, and benchmark claims against these primary sources before making production decisions. All links verified August 2, 2026.
| Resource | URL | What You Get | Last Verified |
|---|---|---|---|
| DeepSeek API Documentation | api-docs.deepseek.com | Official SDK setup, endpoints, authentication | August 2, 2026 |
| DeepSeek Pricing | api-docs.deepseek.com/quick_start/pricing | Current API pricing per million tokens | August 2, 2026 |
| DeepSeek V4 Pro Model Card | huggingface.co/deepseek-ai/DeepSeek-V4-Pro | Architecture details, parameter counts, usage | August 2, 2026 |
| DeepSeek V4 Technical Docs | deepseek.com/V4-model-card-EN.pdf | Official benchmark results, MoE architecture | August 2, 2026 |
| DeepSeek API deprecation notice | api-docs.deepseek.com/quick_start/pricing | Legacy model name retirement schedule | August 2, 2026 |
| OpenRouter Benchmarks | openrouter.ai/deepseek/deepseek-v4-pro/benchmarks | Third-party benchmark comparisons | August 2, 2026 |
| NIST CAISI Evaluation | nist.gov/news-events/news/2026/05/caisi-evaluation-deepseek-v4-pro | Independent government benchmark evaluation | August 2, 2026 |
The Family: Flash vs Pro#
DeepSeek collapsed the old deepseek-chat and deepseek-reasoner endpoints into a single API surface that splits on model tier instead of on whether reasoning is on or off. Reasoning is now a runtime parameter, not a separate model.
DeepSeek V4 Flash#
Flash is the small, fast tier. The model card on Hugging Face lists it at 158B total parameters with a smaller active footprint per token. It is built for high-throughput, latency-sensitive work: chat UIs, autocomplete, classifiers, RAG retrieval rerankers, agent inner loops. The full chain-of-thought trace is available if you ask for it, but Flash defaults to non-thinking mode, which keeps response times in the same ballpark as the older deepseek-chat.
Flash also carries the legacy aliases - or rather, it did. The deepseek-chat and deepseek-reasoner names resolved to V4 Flash with thinking off and on respectively, but that compatibility window closed on 24 July 2026. Those names no longer resolve. If your code is still pointed at them, rename to deepseek-v4-flash or deepseek-v4-pro - the migration guide walks through the cutover.
DeepSeek V4 Pro#
Pro is the new flagship. The base checkpoint weighs 1.6T parameters, with the released instruction-tuned model at 862B total. This is the model you pull out for hard reasoning: long-horizon coding tasks, multi-step planning, dense math, agent workloads where the model has to keep its own state across many tool calls. It is slower than Flash and several times more expensive, but still cheaper than Claude Sonnet 4 or GPT-5 for the same task.
Both tiers share a 1M token context length and a maximum output of 384K tokens. The 384K output number is the one nobody else is matching right now. If you are doing long-form generation, codebase rewrites, or full-document translations, that headroom is the difference between one call and a stitched chain.
Pricing: The Number That Moved The Market#
Here is the current API pricing per million tokens. The table was re-verified against the live docs on August 2, 2026 and is unchanged from June.
| Model | Cache hit input | Cache miss input | Output |
|---|---|---|---|
| DeepSeek V4 Flash | $0.0028 | $0.14 | $0.28 |
| DeepSeek V4 Pro | $0.003625 | $0.435 | $0.87 |
| Claude Sonnet 4 (reference) | $0.30 | $3.00 | $15.00 |
| GPT-5 (reference) | ~$0.40 | ~$2.50 | ~$10.00 |
Some April launch-window coverage still quotes V4 Pro at a higher $1.74 input / $3.48 output reference price. The official pricing page lists the lower standing rates above, re-verified August 2, 2026 - and that page is the source of truth, so re-check it before committing a budget.
A few things worth flagging.
The cache hit price on Flash is $0.0028 per million input tokens. That is not a typo. DeepSeek dropped the cache hit price to one tenth of the launch number on 26 April, and Flash is now the cheapest serious model to call repeatedly with stable system prompts. Build with cache-friendly prompt structure and your input bill effectively disappears.
V4 Pro launched with a 75 percent launch discount that expired 31 May 2026. The standing rates in the table above are the long-term numbers to model against.
OpenAI-Compatible Setup, In One Block#
The DeepSeek API speaks the OpenAI Chat Completions dialect, plus an Anthropic-compatible endpoint if you prefer that SDK. The cleanest path is the OpenAI Python SDK with a custom base_url.
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["DEEPSEEK_API_KEY"],
base_url="https://api.deepseek.com",
)
response = client.chat.completions.create(
model="deepseek-v4-flash",
messages=[
{"role": "system", "content": "You are a senior backend engineer."},
{"role": "user", "content": "Write a FastAPI endpoint that streams SSE events from a Postgres LISTEN/NOTIFY channel."},
],
stream=True,
)
for chunk in response:
delta = chunk.choices[0].delta.content
if delta:
print(delta, end="", flush=True)
That is the whole integration. Swap deepseek-v4-flash for deepseek-v4-pro when you need the bigger model. The TypeScript SDK is identical with the obvious syntax changes.
Turning On Thinking Mode#
Flash defaults to non-thinking. To get the reasoning trace, pass an extra body parameter. The current docs use thinking on the request payload.
response = client.chat.completions.create(
model="deepseek-v4-flash",
messages=[{"role": "user", "content": "Find the bug: <code snippet>"}],
extra_body={"thinking": {"enabled": True}},
)
reasoning = response.choices[0].message.reasoning_content
answer = response.choices[0].message.content
The thinking trace comes back on reasoning_content, the final answer on content. Same shape as the OpenAI o-series response, which means most agent frameworks already know how to read it.
Tool Calling#
Tool calling works the same way it does on OpenAI. Pass a tools array with JSON schema, the model returns tool_calls, you execute and feed results back in. There is one wrinkle: V4 Pro with thinking enabled produces a noticeably better tool plan than V4 Flash on multi-step agent tasks. If your agent is making the wrong tool choice, that is the first thing to flip.
Benchmarks: V4 vs R1 vs V3#
DeepSeek published their own benchmark numbers with the launch. I have not yet seen independent third-party verification, so treat these as the vendor's view. They line up with the early community reports on Hugging Face.
| Benchmark | V3 (Mar 2025) | R1 (Jan 2025) | V4 Flash | V4 Pro |
|---|---|---|---|---|
| MMLU-Pro | 75.9 | 84.0 | 81.4 | 88.7 |
| MATH-500 | 90.2 | 97.3 | 95.8 | 98.4 |
| AIME 2024 | 39.6 | 79.8 | 74.2 | 86.1 |
| GPQA Diamond | 59.1 | 71.5 | 70.8 | 78.3 |
| LiveCodeBench | 40.5 | 65.9 | 67.4 | 74.9 |
| SWE-bench Verified | 42.0 | 49.2 | 54.7 | 63.5 |
The pattern is what you would expect. V4 Flash matches or slightly beats R1 on reasoning while running closer to V3's latency. V4 Pro is a clear step up on every axis, with the SWE-bench number being the headline. 63.5 on SWE-bench Verified puts Pro in striking distance of Claude Sonnet 4 and ahead of every other open model. For an open-weights checkpoint you can host yourself, that is a genuinely new thing.
When To Pick DeepSeek V4 Over Claude or GPT#
This is the question I get most. There is no universal answer, but the heuristics are clearer with V4 than they were with R1.
Reach for V4 Flash when: you are running a high-volume workload, the prompts repeat enough to benefit from caching, latency matters more than the last few percent of quality, and your task is bounded enough that a cheap model will not embarrass you. Examples: classification, structured extraction, RAG synthesis over retrieved chunks, first-pass code review, customer support drafting.
Reach for V4 Pro when: the task is hard, the failure cost is high, and you want frontier reasoning at a fraction of the closed-model price. Examples: codebase-scale refactors, multi-step agent loops, technical writing where the model has to integrate many sources, math and scientific work, anything that benefits from the 1M context window.
Stay on Claude when: you are doing long agentic coding sessions, the work involves Anthropic-specific tooling like Computer Use or the Claude Code SDK, or you need the absolute best result on SWE-bench-style real codebase work. Claude Sonnet 4 still has the edge there, and Opus opens a wider gap.
Stay on GPT when: you are deep into the OpenAI ecosystem, using Assistants, the Realtime API, or function calling features that have not been mirrored elsewhere yet, or running on Azure where DeepSeek is not first-class.
Run V4 locally when: you have the hardware and the privacy constraint. Flash will fit on a single high-memory workstation at 4-bit quantization. Pro needs a small cluster or a rented H200 box, but the weights are MIT licensed and the inference stack is the same one that already runs V3.
A Note From The Creator Side#
We have been covering DeepSeek on the channel since R1 dropped in January 2025. Every new release has been an excuse to redo the cost math for DD Empire's internal tooling, and V4 is the first time the answer has been "move everything." The pricing on Flash makes it the new default for any internal automation that was on gpt-4o-mini or claude-haiku. The 1M context on Pro means the long-context jobs that previously required Gemini are now back on the table for a single provider.
The honest thing to say is that DeepSeek keeps shipping faster than the closed labs. V3 closed the gap, R1 forced the o1 rewrite, and V4 has reset the price floor for the third time in eighteen months. If your stack is closed-only, your next quarter is going to involve a serious build-vs-buy conversation whether you wanted one or not.
For the four-minute video version of this launch, see DeepSeek v4 in 4 Minutes on the Developers Digest YouTube channel. For the older context, the DeepSeek R1 and V3 Developer Guide walks through the architecture and the local deployment story that V4 inherits. For the broader question of where this fits in the 2026 tooling landscape, the AI Coding Tools Pricing 2026 and Best AI Coding Tools 2026 posts have the comparison tables.
What To Build This Week#
Three concrete things worth a Saturday.
- Wire V4 Flash into your existing OpenAI-SDK code as a fallback or A/B variant. It is one config change. Run it side-by-side for a week and look at the cost and latency deltas on a real workload. The numbers will surprise you.
- Try V4 Pro on a task that has been waiting for Claude Opus. Long codebase refactor, dense research synthesis, anything where context length and reasoning depth both matter. Pro's standing rate of $0.435/$0.87 per MTok is cheap enough to run speculatively.
- Rebuild one cache-friendly prompt. Move the stable parts to the top, the variable parts to the bottom, and watch your input bill on Flash drop by an order of magnitude on the cache hit path.
DeepSeek shipped a release that is genuinely worth a workflow change. The next one will probably be along in three months. Build for that.
FAQ#
What is the difference between DeepSeek V4 Flash and V4 Pro?#
V4 Flash is the lightweight tier at 158B parameters, optimized for high-throughput, latency-sensitive work like chat UIs, autocomplete, and RAG retrieval. V4 Pro is the flagship at 862B parameters (1.6T base), built for hard reasoning tasks like codebase refactors, multi-step planning, and dense math. Both share a 1M context window and 384K max output, but Pro produces better results on complex tasks at several times the cost.
How much does DeepSeek V4 cost compared to Claude and GPT?#
V4 Flash costs $0.0028 per million input tokens on cache hits and $0.28 per million output tokens - roughly 10-50x cheaper than Claude Sonnet 4 or GPT-5. V4 Pro costs $0.435 per million input tokens and $0.87 per million output on the official pricing page, re-verified August 2, 2026 (some launch coverage still cites a higher $1.74/$3.48 reference price). At those rates, Pro undercuts closed frontier models by roughly 10-50x on output for comparable reasoning quality.
Is DeepSeek V4 compatible with the OpenAI SDK?#
Yes. DeepSeek V4 speaks the OpenAI Chat Completions API dialect. Point your existing OpenAI SDK at https://api.deepseek.com with your DeepSeek API key and swap the model name to deepseek-v4-flash or deepseek-v4-pro. Most OpenAI-compatible code works with one config change.
How do I enable thinking/reasoning mode in DeepSeek V4?#
Pass extra_body={"thinking": {"enabled": True}} in your API request. The reasoning trace returns on response.choices[0].message.reasoning_content and the final answer on .content. Flash defaults to non-thinking mode for speed; Pro can run either way.
What happened to deepseek-chat and deepseek-reasoner endpoints?#
The old deepseek-chat and deepseek-reasoner model aliases resolved to V4 Flash - with thinking off and on respectively - but they stopped resolving on 24 July 2026. If your requests reference the legacy names, they now fail; rename to deepseek-v4-flash or deepseek-v4-pro. The deepseek-chat to V4 migration guide walks through the cutover step by step, including the post-deadline failure modes.
How does DeepSeek V4 Pro compare to Claude Sonnet 4 on coding benchmarks?#
V4 Pro scores 63.5 on SWE-bench Verified, putting it in striking distance of Claude Sonnet 4 and ahead of all other open models. Claude still has a slight edge on real codebase work, but Pro is the first open-weights model competitive at this level - and at a fraction of the cost.
Can I run DeepSeek V4 locally?#
Yes. The weights are MIT licensed. V4 Flash fits on a high-memory workstation at 4-bit quantization. V4 Pro needs a small cluster or rented H200 box, but uses the same inference stack as V3. Local deployment gives you full control over privacy and eliminates per-token API costs.
When should I use DeepSeek V4 instead of Claude or GPT?#
Use V4 Flash for high-volume, cache-friendly workloads where cost matters more than squeezing the last few percent of quality. Use V4 Pro for hard reasoning at frontier quality when you need the 1M context window or want to avoid closed-model pricing. Stay on Claude for Anthropic-specific tooling like Computer Use or Claude Code. Stay on GPT if you are deep in the OpenAI ecosystem (Assistants, Realtime API, Azure deployments).
Continue Reading#
- DeepSeek Chat to V4 Migration Guide - the legacy endpoint cutover, post-deadline
- DeepSeek V4 Economics: Cost and Quality for Frontier Agentic Coding - why V4 reset the price floor and what it costs to run
- GLM-5.2 vs DeepSeek V4 vs Qwen3: Open-Weights Coding Showdown - how the rest of the open frontier compares
- AI Coding Tools Pricing 2026 - the full cross-tool cost comparison
- Kimi K3 vs K2.7 - the new flagship open-weights model and whether it changes your stack
Get the next deep dive like this in your inbox
One email a week on DeepSeek and the rest of the AI dev stack. Free.
Read next
DeepSeek R1 and V3: The Developer's Guide to Open-Source AI
DeepSeek R1 and V3 developer guide: use the MIT-licensed models through the API, run them locally with Ollama and decide when they beat closed-source models.
9 min readDeepSeek Retires deepseek-chat and deepseek-reasoner on July 24: Your V4 Migration Guide
deepseek-chat is retired after July 24, 2026. Migrate to DeepSeek V4, now served as deepseek-flash, with a what-maps-to-what table and a step-by-step checklist.
9 min readDeepSeek V4 Economics: The Cost-Quality Frontier for Agentic Coding in 2026
DeepSeek V4 economics for agentic coding: worked cost math, the Flash vs Pro split, and when to route coding work to DeepSeek instead of a frontier model.
9 min readNew here? Start with
Technical content at the intersection of AI and development. Building with AI agents, Claude Code, and modern dev tools - then showing you exactly how it works.






