首次调用应使用模型名 deepseek-flash;旧别名仍被接受,但请求会由 DeepSeek-V4.1-Flash 提供服务,并按 Flash 价格计费。官方示例使用 OpenAI 兼容格式、thinking enabled、reasoning_effort high 和非流式响应。官方首次调用文档
适合的任务:将 DeepSeek-V4.1-Flash 接入 OpenAI 兼容的 SDK、软件、脚本或 Agent 工具。官方首次调用文档
不适合的任务:未注明。
适用的模型版本:DeepSeek-V4.1-Flash,API 模型名为 deepseek-flash。官方定价与模型详情
适用的客户端、Agent 或 API:OpenAI API 格式、OpenAI SDK、cURL、Python 和 Node.js;文档也说明 API 兼容 Anthropic 格式,但本页未给出 Anthropic 首次调用代码。官方首次调用文档
推荐的推理档位和参数:页面首次调用示例采用 thinking: {"type": "enabled"}、reasoning_effort: "high"、stream: false;页面未给出适用于所有任务的统一推荐。官方首次调用文档
以下是官方调用配置和完整示例,不是完整提示词。先申请 API key,并通过环境变量 DEEPSEEK_API_KEY 提供给客户端。
| 参数 | 配置 |
|---|---|
OpenAI base_url | https://api.deepseek.com |
Anthropic base_url | https://api.deepseek.com/anthropic |
model | deepseek-flash |
| API key | 申请后填入 DEEPSEEK_API_KEY |
旧名称 deepseek-v4-flash 和 deepseek-v4-flash-vision-exp 仍可用,但对应旧模型已退役,请优先使用 deepseek-flash。官方首次调用文档
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();在 DeepSeek 平台申请 API key,并设置 DEEPSEEK_API_KEY。API key 入口
使用 https://api.deepseek.com 作为 OpenAI base_url,模型名填 deepseek-flash。
按客户端安装对应的 OpenAI SDK,运行上面的 cURL、Python 或 Node.js 示例。
示例为非流式请求;需要流式响应时,将 stream 改为 true。官方首次调用文档
首次调用页写明 API 与 OpenAI/Anthropic 格式兼容,并列出 OpenAI 端点 https://api.deepseek.com、Anthropic 端点 https://api.deepseek.com/anthropic 和模型名 deepseek-flash。
模型脚注写明:deepseek-v4-flash、deepseek-v4-flash-vision-exp 仍被接受,但请求由 DeepSeek-V4.1-Flash 服务并按 Flash 价格计费。官方首次调用文档
模型详情页列出版本 DeepSeek-V4.1-Flash、上下文长度 1M、最大输出 384K,并说明同时支持非思考和思考模式(默认思考)。官方定价与模型详情
官方首次调用代码包含 thinking、reasoning_effort 和 stream;文档明确说明这是非流式示例,stream=true 可获得流式响应。官方首次调用文档
deepseek-flash 的并发上限为每账户 2500;并发按账户计算,与 API key 无关,超过限制返回 HTTP 429。官方限流与隔离文档
非流式请求可能持续收到空行,流式请求可能收到 SSE keep-alive 注释 : keep-alive;若请求发出后 10 分钟仍未开始推理,服务器会关闭连接。官方限流与隔离文档
上下文和最大输出上限来自模型详情页;文档未在首次调用页说明单次请求的其他任务级限制。官方定价与模型详情
旧模型名虽仍接受,但旧模型已退役;新接入应固定使用 deepseek-flash,不要据此推断旧名称的独立模型能力或版本。官方首次调用文档
2026-09-16 仅通过 Tabbit 浏览器访问并核对 DeepSeek 官方首次调用、模型详情和限流页面;未执行真实 API 请求。文档中的代码、模型名、端点和限制均来自页面可见原文,API key 使用环境变量占位。
DeepSeek V4.1 Flash