DeepSeek-V4-Flash-0731
DeepSeek V4-Flash-0731 is an open-weight 284B MoE (13B active) with 1M context and selectable reasoning effort, tuned for coding, chat, and agent workflows.
DeepSeek V4 Flash 0731 is the efficiency-oriented member of the DeepSeek V4 family: a Mixture-of-Experts model with 284B total parameters and 13B activated per token, paired with a 1M-token context window. Its hybrid attention architecture reduces the cost of long-context processing, while configurable reasoning-effort levels let users trade latency and token usage for deeper deliberation.
Its smaller activated footprint makes it well suited to latency- and cost-sensitive applications such as coding assistants, chat systems, and agent workflows. The 0731 release retains the preview model’s architecture and size but adds further post-training focused on agentic performance, producing substantial gains on coding, tool-use, and automation benchmarks.
1import os
2from openai import OpenAI
3
4client = OpenAI(
5 base_url="https://inference.baseten.co/v1",
6 api_key=os.environ["BASETEN_API_KEY"],
7)
8
9response = client.chat.completions.create(
10 model="deepseek-ai/DeepSeek-V4-Flash-0731",
11 messages=[
12 {"role": "user", "content": "<PROMPT>"},
13 ],
14 max_tokens=4096,
15 temperature=1,
16 top_p=0.95,
17 extra_body={
18 "chat_template_kwargs": {"thinking": True, "reasoning_effort": "high"}
19 },
20)
21
22message = response.choices[0].message
23print(message.reasoning_content)
24print(message.content)1{
2 "id": "chatcmpl-7f3a9c2e14b84d1e9a0c5b2f8d6e1a37",
3 "object": "chat.completion",
4 "created": 1785600000,
5 "model": "deepseek-ai/DeepSeek-V4-Flash-0731",
6 "choices": [
7 {
8 "index": 0,
9 "message": {
10 "role": "assistant",
11 "reasoning_content": "<REASONING CONTENT>",
12 "content": "<RESPONSE CONTENT>"
13 },
14 "finish_reason": "stop"
15 }
16 ],
17 "usage": {
18 "prompt_tokens": 38,
19 "completion_tokens": 214,
20 "total_tokens": 252,
21 "completion_tokens_details": {
22 "reasoning_tokens": 61
23 }
24 }
25}