Use deepseek-flash as the model name for the first call; the old aliases are still accepted, but requests are served by DeepSeek-V4.1-Flash and billed at Flash pricing. The official example uses an OpenAI-compatible format, thinking enabled, reasoning_effort set to high, and a non-streaming response. Official first-call documentation
Suitable tasks: Integrating DeepSeek-V4.1-Flash into OpenAI-compatible SDKs, software, scripts, or Agent tools. Official first-call documentation
Unsuitable tasks: Not specified.
Applicable model version: DeepSeek-V4.1-Flash, with deepseek-flash as its API model name. Official pricing and model details
Applicable clients, Agents, or APIs: OpenAI API format, OpenAI SDK, cURL, Python, and Node.js; the documentation also states that the API is compatible with the Anthropic format, but this page does not provide Anthropic first-call code. Official first-call documentation
Recommended reasoning level and parameters: The page's first-call example uses thinking: {"type": "enabled"}, reasoning_effort: "high", and stream: false; the page does not provide a uniform recommendation suitable for all tasks. Official first-call documentation
The following are official call configurations and complete examples, rather than a complete prompt. Apply for an API key first, then provide it to the client through the DEEPSEEK_API_KEY environment variable.
| Parameter | Configuration |
|---|---|
OpenAI base_url | https://api.deepseek.com |
Anthropic base_url | https://api.deepseek.com/anthropic |
model | deepseek-flash |
| API key | Fill in DEEPSEEK_API_KEY after applying |
The old names deepseek-v4-flash and deepseek-v4-flash-vision-exp are still available, but the corresponding old models have been retired, so use deepseek-flash where possible. Official first-call documentation
curl https://api.deepseek.com/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer ${DEEPSEEK_API_KEY}" \
-d '{
"model": "deepseek-flash",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello!"}
],
"thinking": {"type": "enabled"},
"reasoning_effort": "high",
"stream": false
}'# Please install OpenAI SDK first: `pip3 install openai`
import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ.get('DEEPSEEK_API_KEY'),
base_url="https://api.deepseek.com")
response = client.chat.completions.create(
model="deepseek-flash",
messages=[
{"role": "system", "content": "You are a helpful assistant"},
{"role": "user", "content": "Hello"},
],
stream=False,
reasoning_effort="high",
extra_body={"thinking": {"type": "enabled"}}
)
print(response.choices[0].message.content)// Please install OpenAI SDK first: `npm install openai`
import OpenAI from "openai";
const openai = new OpenAI({
baseURL: 'https://api.deepseek.com',
apiKey: process.env.DEEPSEEK_API_KEY,
});
async function main() {
const completion = await openai.chat.completions.create({
messages: [{ role: "system", content: "You are a helpful assistant." }],
model: "deepseek-flash",
thinking: {"type": "enabled"},
reasoning_effort: "high",
stream: false,
});
console.log(completion.choices[0].message.content);
}
main();Apply for an API key on the DeepSeek platform and set DEEPSEEK_API_KEY. API key entry
Use https://api.deepseek.com as the OpenAI base_url, and set the model name to deepseek-flash.
Install the corresponding OpenAI SDK for the client, then run the cURL, Python, or Node.js example above.
The example uses a non-streaming request; for a streaming response, change stream to true. Official first-call documentation
The first-call page states that the API is compatible with the OpenAI and Anthropic formats, and lists the OpenAI endpoint https://api.deepseek.com, the Anthropic endpoint https://api.deepseek.com/anthropic, and the model name deepseek-flash.
A model footnote states that deepseek-v4-flash and deepseek-v4-flash-vision-exp are still accepted, but requests are served by DeepSeek-V4.1-Flash and billed at Flash pricing. Official first-call documentation
The model details page lists version DeepSeek-V4.1-Flash, a context length of 1M, and a maximum output of 384K, and states that both non-thinking and thinking modes are supported (thinking by default). Official pricing and model details
The official first-call code includes thinking, reasoning_effort, and stream; the documentation explicitly says this is a non-streaming example and that stream=true provides a streaming response. Official first-call documentation
deepseek-flash has a concurrency limit of 2,500 per account; concurrency is calculated per account and is unrelated to the API key. Requests exceeding the limit return HTTP 429. Official rate-limit and isolation documentation
Non-streaming requests may continue to receive blank lines, while streaming requests may receive the SSE keep-alive comment : keep-alive; if inference has not started 10 minutes after the request is sent, the server closes the connection. Official rate-limit and isolation documentation
The context and maximum output limits come from the model details page; the first-call page does not state other task-level limits for a single request. Official pricing and model details
Although the old model names are still accepted, the old models have been retired; new integrations should consistently use deepseek-flash. Do not infer independent model capabilities or versions for the old names from this behavior. Official first-call documentation
On 2026-09-16, the DeepSeek official first-call, model details, and rate-limit pages were accessed and checked only through the Tabbit browser; no real API request was executed. The code, model names, endpoints, and limits in the document all come from text visible on those pages, and the API key uses an environment-variable placeholder.
DeepSeek V4.1 Flash