DeepSeek V4 Flash 0731 API Access Guide (2026): Pricing, Context, and Codex Support
DeepSeek dropped V4 Flash 0731 on July 31, 2026, and the pricing alone is enough to make you look twice. We're talking $0.14 per million input tokens for a model that carries a 1-million-token context window and ships with MIT-licensed open weights. Reuters even ran an analysis this week calling out how a cheap Chinese model keeps catching up to Anthropic and OpenAI on their home turf. This release is exactly what they meant.
But cheap doesn't automatically mean useful. So let's cut through it. Here's what V4 Flash 0731 actually is, how to call it, and where it fits versus the frontier models you're probably already paying for.
- DeepSeek V4 Flash 0731 was released on July 31, 2026 and costs $0.14 per million input tokens and $0.28 per million output tokens.
- DeepSeek V4 Flash 0731 is a sparse Mixture-of-Experts model with 284 billion total parameters and 13 billion activated parameters per token.
- DeepSeek V4 Flash 0731 supports a 1,048,576-token context window and a maximum output of 384,000 tokens.
- DeepSeek V4 Flash 0731 ships with MIT-licensed open weights and native Codex-style tool support for agentic coding.
- At $0.14 per million input tokens, DeepSeek V4 Flash 0731 is cheaper than GPT-5.6 Luna, which costs $0.20 per million input tokens as of July 30, 2026.
What Actually Changed in the 0731 Build
V4 Flash isn't new by itself. The 0731 snapshot is the interesting part. DeepSeek tuned this build for agent workloads and shipped native Codex support, so tool calls and multi-step coding loops behave more predictably than the base V4 Flash. The weights are MIT-licensed, which means you can self-host if you want, but for most teams the hosted API is the fast path.
The architecture is a sparse Mixture-of-Experts design: 284 billion parameters total, but only about 13 billion light up per token. That's why it's fast and cheap. You get the routing benefits of a big model without paying to activate all of it on every forward pass.
Pricing (USD per 1M tokens)
| Model | Input / 1M | Output / 1M | Context Window |
|---|---|---|---|
| DeepSeek V4 Flash 0731 | $0.14 | $0.28 | 1,048,576 tokens |
| GPT-5.6 Luna | $0.20 | $1.20 | 1,050,000 tokens |
| GPT-5.6 Terra | $2.00 | $12.00 | 1,050,000 tokens |
Look at the output column. That's where the gap gets wide. V4 Flash 0731 charges $0.28 per million output tokens while GPT-5.6 Luna charges $1.20. For output-heavy jobs like code generation or long summaries, that difference compounds fast.
How It Stacks Up
| Attribute | DeepSeek V4 Flash 0731 | GPT-5.6 Luna |
|---|---|---|
| Context window | 1,048,576 tokens | 1,050,000 tokens |
| Max output | 384,000 tokens | 128,000 tokens |
| Input price / 1M | $0.14 | $0.20 |
| Output price / 1M | $0.28 | $1.20 |
| Weights | MIT-licensed, open | Closed / hosted only |
| Best for | High-volume agents, cost-sensitive batch, long output | Balanced general chat with OpenAI ecosystem tooling |
| Key limitation | Lower peak reasoning vs frontier tier | Higher output cost, no open weights |
The honest read: V4 Flash 0731 is not going to out-reason a top-tier frontier model on the hardest problems. It scores mid-pack on aggregate intelligence benchmarks. But for the huge middle band of work, classification, extraction, code scaffolding, doc processing, it's more than good enough and dramatically cheaper.
Calling It With curl
V4 Flash 0731 exposes an OpenAI-compatible chat endpoint, so if you've written against the Chat Completions shape before, this will feel familiar.
curl https://api.kissapi.ai/v1/chat/completions \
-H "Authorization: Bearer $KISSAPI_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "deepseek-v4-flash-0731",
"messages": [
{"role": "system", "content": "You are a precise code reviewer."},
{"role": "user", "content": "Find the off-by-one bug in this loop..."}
],
"max_tokens": 1200
}'
Python: Batch Extraction on the Cheap
This is where the pricing really pays off. If you're running structured extraction over thousands of documents, the output price does most of the damage to your bill. V4 Flash 0731 keeps that in check.
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ["KISSAPI_KEY"],
base_url="https://api.kissapi.ai/v1",
)
def extract_fields(doc_text: str) -> str:
resp = client.chat.completions.create(
model="deepseek-v4-flash-0731",
messages=[
{"role": "system", "content": "Extract company, amount, and date as JSON."},
{"role": "user", "content": doc_text},
],
max_tokens=400,
)
return resp.choices[0].message.content
# 5,000 docs at ~1,200 input + 200 output tokens each
# Input: 5000 * 1200 / 1_000_000 * 0.14 = $0.84
# Output: 5000 * 200 / 1_000_000 * 0.28 = $0.28
# Total: about $1.12 for the whole run
print(extract_fields(open("invoice_001.txt").read()))
That comment block isn't a flex. It's the actual math. A batch job that would cost you real money on a frontier model lands near a dollar here. Run the same numbers on your own workload with the API cost calculator before you commit.
Node.js: Agent Loop With Tool Calls
The 0731 Codex support shines in tool-calling loops. Here's a minimal agent step.
import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.KISSAPI_KEY,
baseURL: "https://api.kissapi.ai/v1",
});
const tools = [{
type: "function",
function: {
name: "run_tests",
description: "Run the project test suite",
parameters: { type: "object", properties: {}, required: [] },
},
}];
const res = await client.chat.completions.create({
model: "deepseek-v4-flash-0731",
messages: [{ role: "user", content: "Fix the failing test in utils.js, then run tests." }],
tools,
max_tokens: 1500,
});
console.log(res.choices[0].message.tool_calls ?? res.choices[0].message.content);
When To Reach For It, When Not To
Use V4 Flash 0731 for high-volume, output-heavy, latency-tolerant work: bulk classification, data extraction, first-draft code, log analysis, and agent loops that make lots of cheap calls. The 384,000-token max output is genuinely useful when you need the model to emit a large file or a long structured report in one shot.
Skip it for the hardest reasoning tasks where you need the absolute top of the benchmark charts, or for cases where a specific frontier model's tool ecosystem is a hard requirement. For those, keep a frontier model in the loop and route the cheap bulk to V4 Flash.
A practical setup: route 80% of your traffic to DeepSeek V4 Flash 0731 for the routine work, and reserve a frontier model for the 20% of hard cases. On KissAPI you can hit both through one OpenAI-compatible endpoint, so switching models is a one-line change, not a rewrite.
The Bottom Line
DeepSeek V4 Flash 0731 is a value play, and a strong one. It won't top the intelligence leaderboards, but at $0.14 input and $0.28 output per million tokens with a million-token window and open weights, it changes the math on what you can afford to run at scale. If your bill is dominated by high-volume routine calls, this is worth a real test this week.
Try DeepSeek V4 Flash 0731 in Minutes
Create a free account at api.kissapi.ai/register and call V4 Flash 0731 plus frontier models through one OpenAI-compatible endpoint.
Start FreeFrequently Asked Questions
How much does the DeepSeek V4 Flash 0731 API cost?
DeepSeek V4 Flash 0731 costs $0.14 per 1 million input tokens and $0.28 per 1 million output tokens as of August 1, 2026. That's roughly one-third the input price of GPT-5.6 Luna at $0.20 per million input tokens, and its output is far cheaper too.
What is the context window of DeepSeek V4 Flash 0731?
DeepSeek V4 Flash 0731 supports a 1,048,576-token context window and can produce up to 384,000 output tokens in a single response, which is unusually high for output length.
Does DeepSeek V4 Flash 0731 support coding agents?
Yes. DeepSeek V4 Flash 0731 shipped with native Codex-style tool support and MIT-licensed open weights, so it works in agentic coding loops through an OpenAI-compatible API.