DeepSeek V4 Flash 0731 API
Run coding agents and tool loops on an open mixture of experts model from $0.027 per million input tokens.
- 1.3M token context. 304.2B total parameters. 13B active parameters. MIT license.
from openai import OpenAI
client = OpenAI(
base_url="https://api.modelsheep.com",
api_key=API_KEY_MODELSHEEP,
)
response = client.chat.completions.create(
model="deepseek-ai/DeepSeek-V4-Flash-0731",
messages=[
{
"role": "user",
"content": "Why do sheep count people?"
}
],
)
print(response.choices[0].message.content)How to use the DeepSeek V4 Flash 0731 API
- 1
Create a ModelSheep account and copy an API key from the dashboard.
- 2
Point the OpenAI SDK at the base url
https://api.modelsheep.com, pass the key, and set the model todeepseek-ai/DeepSeek-V4-Flash-0731. - 3
Send your messages to
/chat/completions, setmax_tokenshigh enough to cover the deliberation tokens, and read the answer fromchoices[0].message.content.
What DeepSeek V4 Flash 0731 is
DeepSeek V4 Flash 0731 is an open mixture of experts language model from DeepSeek. It reads and writes text only. The 0731 build keeps the architecture of the earlier preview and replaces the post-training, which DeepSeek aimed at agent work. DeepSeek reports that this build beats the larger V4 Pro preview on every agentic benchmark it publishes while activating only a small share of its weights per token.
What it does well
- Drives a terminal coding agent through a multi-step repair task.
- Calls a tool, reads the result, and decides the next call over a long run.
- Takes a whole repository in one prompt and answers questions across the files.
What it is not for
- Text only. It accepts no image or audio input.
- Reasoning never switches off. The lowest effort setting is still a reasoning
Calling it
Post to /chat/completions with the model string deepseek-ai/DeepSeek-V4-Flash-0731. The OpenAI SDK reaches it after you change the base URL and the key. Set reasoning_effort to low, high or max. Raise the output token limit as you raise the effort because the model spends its first tokens on deliberation and a low ceiling cuts the answer off before it starts.
deepseek-ai/DeepSeek-V4-Flash-0731 /chat/completions
SDKs and languages
DeepSeek V4 Flash 0731 answers on an HTTP endpoint, so any language that can post JSON reaches it. These are the ones the box above writes out.
- OpenAI SDK
- PythonTypeScriptGoJavaC#PHPRust
- Anthropic SDK
- PythonTypeScriptGoJavaC#PHPRust
- HTTP
- cURLPythonTypeScriptGoRustJavaC#PHP
Specifications
| Author | DeepSeek |
|---|---|
| Category | language |
| Accepts | text |
| Returns | text |
| Total parameters | 304.2B |
| Active parameters | 13B |
| Score | 34.5 on Artificial Analysis intelligence index |
| Languages | not published |
| Precision served | FP8 |
| Context | 1.3M tokens |
| Vector | n/a |
| License | MIT |
Price
Input
$0.027
per million tokens
Output
$0.117
per million tokens
Against OpenRouter
10%
below the cheapest of 23 providers
The cheapest OpenRouter price for this model was $0.030 in and $0.130 out, with a median of $0.175 and $0.400 across the comparable providers. Read on 2026-09-17.
License
MIT. It permits commercial use, modification and redistribution. It requires that the license text stays with the model. No extra vendor terms gate the weights, so you can read the license once and ship.
Similar models
- Parameters
- 27.8B
- Context
- 1M
- Input per 1M
- $0.180
- Output per 1M
- $1.980
- License
- Apache 2.0
- Parameters
- 1.7T
- Context
- 1M
- Input per 1M
- $0.522
- Output per 1M
- $1.568
- License
- MIT
- Parameters
- 1.6T, 37B
- Context
- 1M
- Input per 1M
- $0.939
- Output per 1M
- $1.879
- License
- MIT
Start using DeepSeek V4 Flash 0731
Point the OpenAI SDK at api.modelsheep.com. Your prompts stay in Germany, and nothing is retained.