概述
DeepSeek-V4.1-Flash 是深度求索全新模型结构系列中尺寸最小的模型,具备原生多模态视觉理解能力。模型为 552B 参数的 MoE 模型,采用全新的 Causal-Encoder-Decoder 结构,输入与输出不对称:输入激活仅 8B、输出激活 16B,成本显著低于已知的同尺寸模型。新一代结构大幅压缩 KV Cache,对 HBM 的需求降至上一代的 1/4、对 SSD 的需求降至 1/8,显著降低缓存命中费用占比较高的 Agent 类任务成本。模型支持 1M 上下文与最大 384K 输出,思考模式默认开启,可按任务复杂度选择 low / high / max 三档思考强度。
非对称 MoE 结构
552B 参数 MoE,采用 Causal-Encoder-Decoder 结构,输入激活 8B、输出激活 16B。
原生视觉理解
图像与文本自预训练起联合处理,支持 JPEG / PNG / GIF / WebP 图片输入。
更少缓存更省成本
KV Cache 对 HBM 的需求降至上一代的 1/4、对 SSD 降至 1/8,Agent 任务缓存成本更低。
百万上下文与三档思考
1M token 上下文窗口、最大输出 384K;思考模式默认开启,支持 low / high / max 三档强度。
功能
深度思考low / high / max,默认开启、默认 high;reasoning_effort 设为 none 可关闭✓
视觉理解图像输入(JPEG / PNG / GIF / WebP)✓
工具调用Tool Calls,思考模式下同样可用✓
JSON 模式response_format 设为 json_object✓
上下文缓存命中缓存按缓存价计费✓
流式输出✓
前缀补全Beta✓
定价
空闲时段价格为高峰时段价格的一半。高峰时段为北京时间周一至周五 9:00 - 12:00、14:00 - 18:00(其余为空闲时段)。
空闲时段
输入$0.15/M tokens
输入(缓存命中)$0.003/M tokens
输出$0.6/M tokens
高峰时段
输入$0.3/M tokens
输入(缓存命中)$0.006/M tokens
输出$1.2/M tokens
速率限制与上下文
上下文窗口1M
最大输出384K
RPM(请求 / 分钟)15K
TPM(token / 分钟)1200K
API 参考
POST
https://api.tokenfab.com/v1/chat/completions请求示例
curl https://api.tokenfab.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $TOKENFAB_API_KEY" \
-d '{
"model": "deepseek-v4.1-flash",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Please introduce yourself."}
]
}'import os
from openai import OpenAI
client = OpenAI(
api_key=os.environ.get("TOKENFAB_API_KEY"),
base_url="https://api.tokenfab.com/v1",
)
response = client.chat.completions.create(
model="deepseek-v4.1-flash",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Please introduce yourself."},
],
)
print(response.choices[0].message.content)import OpenAI from "openai";
const client = new OpenAI({
apiKey: process.env.TOKENFAB_API_KEY,
baseURL: "https://api.tokenfab.com/v1"
});
const response = await client.chat.completions.create({
model: "deepseek-v4.1-flash",
messages: [
{ role: "system", content: "You are a helpful assistant." },
{ role: "user", content: "Please introduce yourself." }
]
});
console.log(response.choices[0].message.content);响应示例
{
"id": "chatcmpl-7f3a2c91",
"object": "chat.completion",
"created": 1789012800,
"model": "deepseek-v4.1-flash",
"choices": [{
"index": 0,
"message": {
"role": "assistant",
"reasoning_content": "The user wants me to introduce myself, so I should state the model name and main capabilities.",
"content": "I am DeepSeek-V4.1-Flash, a multimodal MoE model developed by DeepSeek. I accept text and image input, support a 1M context window, and have thinking mode enabled by default."
},
"finish_reason": "stop"
}],
"usage": {
"prompt_tokens": 14,
"completion_tokens": 58,
"total_tokens": 72
}
}请求参数
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
model | string | ✓ | 模型 ID,如 deepseek-v4.1-flash |
messages | array | ✓ | 对话消息列表,含 role 和 content;user 消息的 content 可为内容块数组以携带图片,支持 JPEG、PNG、GIF、WebP |
thinking | object | — | 思考模式开关,type 取 enabled / disabled,默认 enabled |
reasoning_effort | string | — | 思考强度,low / high / max,默认 high;none 关闭思考模式 |
max_tokens | int | — | 最大输出 Token 数,1 到 384K(393216);未设置时非思考模式默认 8K,思考模式默认 64K(max 档为 128K) |
temperature | float | — | 采样温度,0–2,默认 1;思考模式下不生效 |
top_p | float | — | 核采样,默认 1;思考模式下小于 0.95 的值会被抬升至 0.95,非思考模式下恒为 1.0 |
response_format | object | — | type 设为 json_object 启用 JSON 模式,需同时在提示词中要求输出 JSON |
stream | bool | — | 是否以 SSE 流式返回消息增量 |
tools | array | — | 工具定义列表,目前仅支持 function |
tool_choice | string | — | 工具调用策略,none / auto / required / 指定函数;思考模式下不支持 required 与指定函数 |