DeepSeek-V4-Flash Now Supports the Responses API and Codex: What Developers Need to Know

DeepSeek-V4-Flash now speaks OpenAI's Responses API and runs inside Codex. See the full compatibility matrix, 2-minute setup, and the sharp edges to avoid.

Ashley Innocent

Ashley Innocent

31 July 2026

DeepSeek-V4-Flash Now Supports the Responses API and Codex: What Developers Need to Know

Apidog for Enterprise

On-Premises Deploy

SSO & RBAC

SOC 2 Compliant

Explore Apidog Enterprise

Buried inside DeepSeek’s July 31 V4-Flash release announcement is the most strategically interesting line: the official V4-Flash “natively supports the Responses API format and is fully adapted for Codex.”

Read that again. A Chinese open-weight lab just implemented OpenAI’s newest API format, the one OpenAI built for its own agent products, specifically so that OpenAI’s own coding agent can run on a DeepSeek model. The change log states the motivation plainly: “To meet the demand for Codex, our API now supports the Responses API format.”

This article covers what that means in practice: how compatible the implementation is, what’s silently ignored, how to wire V4-Flash into Codex in two minutes, and where the sharp edges are. If you just need basic API setup first, start with our V4-Flash public beta guide.

button

Why the Responses API matters here

OpenAI introduced the Responses API as the successor to Chat Completions: a single interface designed for agentic workloads, with first-class reasoning items, built-in tools, and semantic streaming events. We break the format down in How to use the OpenAI Responses API, but the short version is: it’s the format OpenAI’s agent stack, including Codex, speaks natively.

Until now, running a non-OpenAI model behind a Responses API client meant a translation proxy or nothing. DeepSeek skipped the proxy and implemented the format server-side at https://api.deepseek.com. Your existing OpenAI SDK works unchanged:

# pip3 install openai
from openai import OpenAI

client = OpenAI(
    api_key="<your DeepSeek API key>",
    base_url="https://api.deepseek.com"
)

response = client.responses.create(
    model="deepseek-v4-flash",
    instructions="You are a helpful assistant.",
    input="Hi, how are you?",
)

print(response.output_text)

One scope note before you get excited: the Responses API currently works with deepseek-v4-flash only. DeepSeek says deepseek-v4-pro support arrives in early August 2026.

How complete is the compatibility?

DeepSeek published a full compatibility matrix, which is more than most “OpenAI-compatible” providers bother to do. The important rows:

Supported and working:

Accepted but inert:

Not supported, by design:

The graceful part: unsupported parameters are silently ignored rather than rejected, so existing Responses API clients connect without modification. The unforgiving part: requests that exceed the 1M-token context window return a 400 error instead of being truncated.

Streaming follows the Responses API event model, response.created through response.completed, with reasoning deltas (response.reasoning_text.delta) arriving as separate events from output text. There’s no data: [DONE] terminator; the stream ends with a response.completed, response.incomplete, or response.failed event. If your SSE handler waits for [DONE], it will hang. Our guide on streaming API responses with server-sent events covers defensive parsing patterns for exactly this kind of dialect difference.

Setting up Codex with DeepSeek-V4-Flash

Codex talks to models through the Responses API, which is the whole reason this release exists. DeepSeek’s integration guide offers two paths, and both configure every Codex client at once (CLI, ChatGPT desktop app, and the VS Code extension), since they share one config.

The one-click script

Make sure Codex CLI or the ChatGPT desktop app is installed and has run at least once, then:

bash <(curl -fsSL https://cdn.deepseek.com/api-docs/codex-deepseek-setup-en.sh)

Windows users run the PowerShell variant:

irm https://cdn.deepseek.com/api-docs/codex-deepseek-setup-en.ps1 | iex

The script asks for your DeepSeek API key on first run, then does four things: backs up your existing ~/.codex/config.toml to ~/.codex/backup-deepseek/, writes a model catalog to ~/.codex/models.json, adds a [model_providers.deepseek] section to your config while preserving MCP servers and project trust settings, and validates the syntax before writing anything. Run it again anytime to switch models or restore your original setup from the menu.

Standard caution applies to piping curl into bash: read the script first if that’s your policy. The backup-and-validate behavior is a good sign, but it’s still a third-party script touching your Codex config.

What the model catalog tells you

The models.json the script writes is worth reading, because it documents how DeepSeek positions the model inside Codex:

The catalog describes V4-Flash as the “latest frontier agentic coding model,” and only deepseek-v4-flash works today. The catalog already includes deepseek-v4-pro for when support lands in early August.

Does it actually hold up inside Codex?

DeepSeek’s pitch is that the 0731 re-post-training was aimed at exactly this workload. Their published agent numbers: Terminal Bench 2.1 at 82.7, Cybergym at 76.7, Toolathlon verified at 70.3, DeepSWE at 54.4, all reported as beating V4-Pro-Preview. Treat these as vendor numbers until independent runs appear; they were produced with DeepSeek’s own harness at max effort, and two of the benchmarks in the announcement are internal test sets.

The economics are harder to argue with. At $0.14 per million input tokens (cache miss) and $0.28 per million output, V4-Flash costs a fraction of the models Codex normally runs, and cache hits drop input cost to $0.0028. A day of heavy agent sessions costs less than the coffee you drink during it. For the full cost table, see the pricing section of our beta guide. If you’re weighing Codex itself against alternatives, our Claude Code vs Codex CLI comparison covers the agent side of the equation.

Verify the endpoint before you trust the agent

An agent is only as debuggable as the API behind it, and a brand-new public beta endpoint deserves a shakedown before you let Codex loose on a real repository. This is a five-minute job in Apidog:

  1. Add POST https://api.deepseek.com/responses as an endpoint and store your key in an environment variable.
  2. Send a minimal responses.create payload and confirm the shape of the output items: a reasoning item followed by a message item.
  3. Turn on stream: true and watch the event sequence live. Apidog displays each SSE event as it arrives, which makes it obvious whether your client should be listening for response.output_text.delta or waiting on something that never comes.
  4. Save a request with a function tool attached and confirm the function_call output format matches what your handler expects.

When the V4-Pro Responses rollout lands in August, rerun the same saved requests against the new model name and diff the behavior. Download Apidog free and keep the whole suite in one project.

FAQ

Which DeepSeek models work with the Responses API? Only deepseek-v4-flash today. deepseek-v4-pro support is scheduled for early August 2026.

Do I need a new SDK? No. The official OpenAI SDK works; point base_url at https://api.deepseek.com and call client.responses.create. Setup details are in our V4-Flash public beta guide.

Does multi-turn state work like OpenAI’s version? No. The DeepSeek implementation is stateless: previous_response_id, conversation, and store are not supported. Send the full history as input items on every call.

Can I use DeepSeek in Codex alongside my OpenAI account? Yes. The setup adds DeepSeek as a model provider; the script’s menu switches between models, and your original config is backed up so you can restore it.

Is this the same as Anthropic API compatibility? Separate feature. DeepSeek also exposes an Anthropic-format endpoint at https://api.deepseek.com/anthropic, which is how Claude Code integration works. The Responses API endpoint exists for OpenAI-format agent tooling like Codex.

What this release really signals

Model quality is converging, so the competition is moving to the integration layer. DeepSeek looked at where developers actually live, inside agents like Codex, and built the exact plumbing needed to be a drop-in backend there, down to publishing which parameters are silently ignored. That transparency is rare, and it makes the compatibility story credible.

The play is obvious and smart: OpenAI ships the agent, DeepSeek serves the tokens at a tenth of the price. Whether the 0731 model genuinely outruns V4-Pro-Preview in your codebase is something only your own evals can answer. Wire it into Apidog, run your test suite against both, and let the results, not the benchmark table, decide.

Explore more

DeepSeek-V4-Flash API Is Live: How to Use the Official API (Public Beta Guide)

DeepSeek-V4-Flash API Is Live: How to Use the Official API (Public Beta Guide)

DeepSeek-V4-Flash-0731 is live in public beta. Get an API key, make your first call, control thinking mode, and see cache-hit pricing in this hands-on guide.

31 July 2026

How to Run Kimi K3 Locally (and When You Shouldn't)

How to Run Kimi K3 Locally (and When You Shouldn't)

Kimi K3's open weights are live: 594 GB MXFP4, 2.8T params. What it takes to self-host with vLLM or llama.cpp, the M1 Max reality check, and how to test your local endpoint.

29 July 2026

Claude Opus 5 vs Sonnet 5: Which Tier Do You Actually Need?

Claude Opus 5 vs Sonnet 5: Which Tier Do You Actually Need?

Claude Opus 5 vs Sonnet 5 compared on real cost per task: $5/$25 against Sonnet's $2/$10 intro rate that rises to $3/$15 on Sep 1, 2026, plus specs, benchmarks, and a decision table by workload.

25 July 2026

Practice API Design-first in Apidog

Discover an easier way to build and use APIs

DeepSeek-V4-Flash Now Supports the Responses API and Codex: What Developers Need to Know