DeepSeek-V4-Flash is now generally available: native Codex support, beats its own larger V4-Pro, and output costs 89× less than Opus 4.8
- It beats its own larger V4-Pro on all nine agent benchmarks, by as much as 4× on the biggest gap — though who ran the numbers is worth a closer look.
- Output costs $0.28 per million tokens, vs. $25 for Claude Opus 4.8. There's also a footnote at the bottom of the price page worth reading.
- One command swaps out the model behind Codex. Your existing setup stays untouched.
API graduates to general availability — no changes needed on your end
DeepSeek's V4-Flash has officially left preview. Public beta started July 31, under version number 0731.
The most practically useful change: it can now plug directly into Codex. One command swaps Codex's underlying model to DeepSeek, and your existing configuration stays exactly as it is.
Second is the price. Output costs $0.28 per million tokens; the same amount from Claude Opus 4.8 runs $25.
Third, the model weights are now open under the MIT License, so anyone can self-host.
If you're already calling the DeepSeek API, no code changes needed: the endpoint stays the same, model is still deepseek-v4-flash, and you'll automatically get the new version.
One boundary worth drawing clearly: this release only touches the V4-Flash line. The V4-Pro API hasn't changed, and neither have the models behind the DeepSeek App or the web version. For a V4-Pro general release, the official word is "coming soon."
Beats the larger V4-Pro on all nine agent tests
So how much better is it than the previous version? DeepSeek published a comparison table covering nine agent-focused benchmarks.
All nine benchmarks beat the V4-Pro preview: DeepSWE 54.4 vs. 12.8, DSBench-Hard 59.6 vs. 31.1, Cybergym 76.7 vs. 52.7. Even the narrowest gap, on Agents' Last Exam, is 8.7 points. V4-Pro is a 1.6-trillion-parameter model; Flash has 284B.
The same table also shows all nine scores coming in below Claude Opus 4.8 — a detail missing from the release materials. The smallest gaps are on Agents' Last Exam (0.5) and Terminal Bench (2.3); the largest are on NL2Repo (15.5) and DSBench-Hard (12.1).
The biggest jump is DeepSWE, from 7.3 in the preview to 54.4 now.
A third party runs the same benchmark — Opus holds steady, DeepSeek drops 3.7
The table above is DeepSeek's own. Independent testing firm Artificial Analysis ran its own evaluation on the same day, and one number doesn't line up.
On Terminal-Bench, Claude Opus 4.8 scores 85 on both rulers. The V4-Flash 0731, however, gets 82.7 from DeepSeek and 79 from the third party. The official footnote explains that the Code Agent tasks in these nine benchmarks use a DeepSeek-internal harness that hasn't been released — unavailable externally and impossible to reproduce. Agent benchmark scores lean heavily on this harness layer; we've covered an example where swapping only the harness, not the model, pushed ARC-AGI-3 scores to 99%.
Related on this siteA new harness alone: pushing Opus 4.8 and Fable 5 to 99% on ARC-AGI-3
The third party's remaining numbers confirm the size of this upgrade (and, for what it's worth, the same leaderboard shows GLM-5.2 at 51 — one point above Flash 0731, a different story from the official table's clean sweep over GLM):
It's also the smallest model in its class: for every token processed, V4-Flash activates fewer than a third of GLM-5.2's active parameters and an eighth of Kimi K3's.
Kimi K3 tech report: a 2.8T-parameter model that uses three architectural changes to stretch compute efficiency 2.5×
Input is 35× cheaper than Claude Opus 4.8; output is 89× cheaper
Capabilities are roughly mapped out — now what does it cost? Here are the three tiers from the official pricing page, in per-million-token units. The Claude Opus 4.8 column is from Anthropic's official pricing, included for reference.
| Per million tokens | V4-Flash | V4-Pro | Claude Opus 4.8 |
|---|---|---|---|
| Input (cache miss) | $0.14 | $0.435 | $5.00 |
| Input (cache hit) | $0.0028 | $0.003625 | — |
| Output | $0.28 | $0.87 | $25.00 |
| Concurrency limit | 2500 | 500 | — |
In multiples: input is 35× cheaper per million tokens, output 89×. Against its own V4-Pro, Flash's input and output prices are both under a third, while its concurrency ceiling is 5× higher.
Three easy-to-miss perks
The price didn't go up. 0731's pricing is identical to the April preview — significantly better capabilities, same price sheet.
Cache hits drop to a fraction of a discount. When you resend the same opening context, results from the previous run are reused, and that portion costs just $0.0028 — one-fiftieth of the miss price, a 98% discount. Artificial Analysis calls this out specifically: most of the industry offers a 90% cache discount; DeepSeek gives 98%. It's a major reason per-task costs stay this low. And for the repeated codebase queries that are Codex's everyday rhythm, hit rates are naturally high.
It also writes less. Artificial Analysis ran its full eval suite and found 0731 used about 206M output tokens versus 234M for the previous generation. 12% fewer tokens for a higher score — savings on top of the already-low list price.
The Codex integration: even Codex's own system prompt is included
Now for the most useful thing mentioned at the top: connecting to Codex. Codex talks to models via the Responses API, and DeepSeek now natively supports that format — that's the precondition for connecting at all. But if the integration stopped at "the interface works," DeepSeek inside Codex would be a hobbled model: unaware of its own context size, unsure how to submit code patches, and missing the behavioral guidelines Codex's built-in model gets.
What they actually did goes much further. The setup process writes a ~/.codex/models.json — essentially a model specification document for Codex, declaring the DeepSeek model in the exact format Codex's built-in model uses.
The third layer is the most notable part of this integration. That models.json reproduces Codex's official system prompt in full, from the "You are Codex" opening line through the entire set of rules about loading skill files and how to handle destructive commands.
Once connected, the model is DeepSeek's, but the behavioral code — "who I am, how I work, what I won't do" — remains Codex's original. The so-called Codex optimization isn't just making two interfaces talk; it's tuning the model to work with that whole shell.
Setup guide: one command, existing settings untouched
Two prerequisites before you start: the Codex CLI or ChatGPT desktop app has been launched at least once (so the ~/.codex directory exists), and your client version is 0.144.0 or higher.
Option 1: Official script, one command
bash <(curl -fsSL https://cdn.deepseek.com/api-docs/codex-deepseek-setup-en.sh)
irm https://cdn.deepseek.com/api-docs/codex-deepseek-setup-en.ps1 | iexThe script walks you through picking a model from a menu; on first run, it asks for your API Key (starts with sk-, obtainable from the DeepSeek platform). Four things it does, all carefully:
- Backs up any existing
~/.codex/config.tomlto~/.codex/backup-deepseek/so you can always restore. - Writes the model catalog
~/.codex/models.json— the spec document from the previous section. - Edits
config.toml: rewrites only the necessary fields and appends a[model_providers.deepseek]block. Your existing MCP servers and project trust levels are preserved; any conflicting fields are removed with a printed reason. - Validates both files' syntax before writing — if validation fails, it aborts without touching a single file.
You can rerun the script anytime to switch models, or pick option 3 in its menu to restore the pre-install state.
Option 2: Manual configuration
Prefer not to run the script? The full models.json content is available to copy from the official docs. Then add this to config.toml:
model = "deepseek-v4-flash" model_provider = "deepseek" preferred_auth_method = "apikey" forced_login_method = "api" model_reasoning_effort = "high" model_catalog_json = "~/.codex/models.json" [model_providers.deepseek] name = "deepseek" base_url = "https://api.deepseek.com/" wire_api = "responses" experimental_bearer_token = "<your DeepSeek API Key>"
wire_api = "responses" — it tells Codex to speak the Responses API protocol with the model. model_reasoning_effort is the three-level setting from the previous section: low / high / max.Verifying it works
All three Codex clients read the same config — configure once, use everywhere:
codex. If the startup banner shows model: deepseek-v4-flash, it's live.What's still out of reach
deepseek-v4-flash connects to Codex so far, and the same goes for the Responses API. V4-Pro support is promised for early August 2026.previous_response_id and conversation aren't supported. Multi-turn conversations require resending the full history every time.apply_patch (the one Codex uses). Anything else returns a 400.One more design choice worth calling out: unsupported parameters are silently ignored, not rejected. That's why existing Responses API clients can connect without code changes — at the cost that you need to know which parameters are being ignored.
Only the final training step changed — not a single model parameter was touched
Finally, where does this capability jump come from? The official changelog has the key sentence: 0731 shares the exact same architecture and size as the preview — only the post-training was redone.
Post-training is the second phase, after the model has finished reading massive amounts of text. It uses demonstrations and rewards to teach the model how to actually use what it absorbed. Same books, different teaching method.
One thing worth getting precise: the open-sourced weights on HuggingFace are 304B parameters — about 20B more than the 284B backbone. The difference is a speculative decoding module: a small module guesses the next few tokens in advance, and the main model verifies them all at once, adopting the correct guesses. It only speeds up token generation; it doesn't change what the model knows. With vLLM, it's enabled with a single flag.
As for how the post-training was done, the model card describes a two-stage approach: first, demonstration data and reinforcement learning train expert models for each domain; then a unified model learns from these experts' live answers, folding all the skills into one model.
The low price also comes from the model's own structure: of the 284B parameters, each token activates only 6 of 256 experts plus 1 shared — roughly 13B in play. Expert weights are stored at FP4 precision, with most of the rest at FP8. A compressed attention mechanism then drastically cuts the cache that dominates VRAM in long contexts. DeepSeek's official figures: for a 1-million-token context, V4-Pro's per-token inference compute is 27% of the previous V3.2's, and its cache is 10%.
One thing worth noting: the savings are in compute and cache, not VRAM. All 284B parameters still need to sit in memory, because the next token could call on any expert.
Swap the model behind Codex with one command: DeepSeek-V4-Flash is GA, with output 89× cheaper
On July 31, DeepSeek moved V4-Flash to general availability and added native support for the API format Codex uses. One page, with visuals, covering what shipped, how capable it is, what it costs, and how to connect it.
↓ One page, plus one animated diagram
On July 31, DeepSeek moved V4-Flash from preview to general availability, version 0731. If you're already calling it, you change nothing — same endpoint, same model name. What's new: a new API format and open-sourced weights. Only the V4-Flash line changed; the V4-Pro API and the DeepSeek App and website are untouched.
model = "deepseek-v4-flash"
Use the same model name and get the latest version. 284B total parameters, ~13B active per token, 1M context — same as the April preview.
Native support for the Responses API (the interface format Codex uses), with a dedicated Codex integration; weights open-sourced under the MIT License for self-hosting.
Architecture and size are identical to the April preview. This release only redid the post-training — the second phase where demonstrations and rewards teach the model how to use what it absorbed from massive text. Same books, new teaching method. All nine agent-oriented benchmarks improved.
The table above is DeepSeek's own. Independent tester Artificial Analysis ran its own evaluation the same day: Claude Opus 4.8's score matches on both rulers, but DeepSeek's own column doesn't.
The low price comes from the structure: of the 284B parameters, each token activates only 6 of 256 experts plus 1 shared — roughly 13B in play. Expert weights are stored at a more compact precision, and a compressed attention mechanism dramatically cuts the cache that dominates long contexts. The price sheet looks like this (per million tokens, roughly a million words).
Connecting to Codex is the most practical part: run one official script (full command copyable in the article). It writes two config files; the key line is wire_api = "responses". The integration goes as deep as models.json — a spec document for Codex.
✔ Rewrites only necessary fields; your other settings stay; conflicts are removed with reasons printed
✔ Validates syntax before writing; aborts on failure without touching files
✔ Rerun anytime to switch models, or restore the pre-install state from the menu
✘ The server doesn't store conversation history; you resend the full history each turn
✘ Requests over the context window error out directly, no automatic truncation
✘ Sending an image won't error — it's silently replaced with a placeholder line; easy to miss
of output
on Xiaohu's bill
Opus 4.8 charges $25,
this charges $0.28.
preview → 0731
unusually low —
DeepSeek doesn't
explain it
DeepSeek: 85 / Third party: 85
DeepSeek: 82.7 / Third party: 79
only in its own column
- × Only deepseek-v4-flash connects
- × No conversation memory — send full history
- × Images are silently replaced with a placeholder
