DeepSeek V4.1 Flash

deepseek-v4.1-flash-1017
文本DeepSeekDeepSeek V4.1 Flashdeepseek-v4.1-flash-1017

deepseek-v4.1-flash-1017 是 V4.1 Flash 的 1017 检查点,权重开源,比首版基准更高、完成更快、输出更短。支持图片输入,上下文 1M token,最大输出 384K,可切换思考模式,支持 JSON 输出和工具选择。

鉴权

Base URL
https://api.dreamto.ai
Authorization
Authorization: Bearer YOUR_API_KEY
Content-Type
application/json
模型名 (model)
deepseek-v4.1-flash-1017

接入协议

为什么选这个协议

适合已有 OpenAI SDK、Chat Completions 代码或统一网关接入的用户。

接口地址
POST/v1/chat/completions
Authorization: Bearer YOUR_API_KEYContent-Type: application/json

请求 / 响应 JSON

请求
{
  "stop": [
    "\n\n"
  ],
  "model": "deepseek-v4.1-flash-1017",
  "tools": [],
  "top_p": 1,
  "stream": false,
  "user_id": "user_123",
  "logprobs": false,
  "messages": [
    {
      "role": "user",
      "content": "你好,世界"
    }
  ],
  "thinking": {
    "type": "enabled",
    "reasoning_effort": "high"
  },
  "max_tokens": 4096,
  "temperature": 1,
  "tool_choice": "auto",
  "top_logprobs": 5,
  "stream_options": {
    "include_usage": true
  },
  "response_format": {
    "type": "json_object"
  },
  "system_instruction": "你是一个严谨的助手。"
}
响应
{
  "id": "chatcmpl_example",
  "model": "deepseek-v4.1-flash-1017",
  "usage": {
    "total_tokens": 24,
    "prompt_tokens": 8,
    "completion_tokens": 16
  },
  "object": "chat.completion",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello from Mix API"
      },
      "finish_reason": "stop"
    }
  ],
  "created": 1710000000
}

请求字段 / 响应字段

请求字段
字段类型必填默认可选值 / 范围说明示例
messagesarrayY--DeepSeek Chat Completions 消息数组。[{"role":"user","content":"你好,世界"}]
system_instructionstringN--用于约束角色、风格和回答边界。你是一个严谨的助手。
temperaturenumberN1-控制随机性,DeepSeek 官方建议 temperature 和 top_p 二选一调整。1
top_pnumberN1-核采样概率阈值,DeepSeek 官方建议不要同时修改 temperature。1
max_tokensintegerN--限制本次响应的最大输出长度。4096
stoparrayN--停止生成的字符串或字符串数组。["\n\n"]
streambooleanNfalse-是否使用 SSE 流式响应。false
stream_optionsobjectN--流式响应附加选项,例如 include_usage。{"include_usage":true}
thinkingobjectN--DeepSeek 思考模式配置,用于控制推理输出。{"type":"enabled","reasoning_effort":"high"}
response_formatobjectN--要求模型返回 JSON object 等结构化格式。{"type":"json_object"}
toolsarrayN--DeepSeek tools/function calling 定义。[]
tool_choiceenumN-none, auto, required控制工具调用策略。auto
logprobsbooleanNfalse-是否返回输出 token 的 log probabilities。false
top_logprobsintegerN--每个位置返回的最可能 token 数量。5
user_idstringN--终端用户唯一标识,用于 DeepSeek 侧安全与滥用检测。user_123
响应字段
字段类型必填默认可选值 / 范围说明示例
idstringN---chatcmpl_example
objectstringN---chat.completion
createdintegerN---1710000000
modelstringN---deepseek-v4.1-flash-1017
choicesarrayN---[{"index":0,"message":{"role":"assistant","content":"Hello from Mix API"},"finish_reason":"stop"}]
choices[]objectN---{"index":0,"message":{"role":"assistant","content":"Hello from Mix API"},"finish_reason":"stop"}
choices[].indexintegerN---0
choices[].messageobjectN---{"role":"assistant","content":"Hello from Mix API"}
choices[].message.rolestringN---assistant
choices[].message.contentstringN---Hello from Mix API
choices[].finish_reasonstringN---stop
usageobjectN---{"total_tokens":24,"prompt_tokens":8,"completion_tokens":16}
usage.prompt_tokensintegerN---8
usage.completion_tokensintegerN---16
usage.total_tokensintegerN---24

代码示例

cURLrequest.sh
curl -X POST "https://api.dreamto.ai/v1/chat/completions" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "deepseek-v4.1-flash-1017",
  "messages": [
    {
      "content": "你好,世界",
      "role": "user"
    }
  ],
  "system_instruction": "你是一个严谨的助手。",
  "temperature": 1,
  "top_p": 1,
  "max_tokens": 4096,
  "stop": [
    "\n\n"
  ],
  "stream": false,
  "stream_options": {
    "include_usage": true
  },
  "thinking": {
    "reasoning_effort": "high",
    "type": "enabled"
  },
  "response_format": {
    "type": "json_object"
  },
  "tools": [],
  "tool_choice": "auto",
  "logprobs": false,
  "top_logprobs": 5,
  "user_id": "user_123"
}'