DeepSeek
Endpoint: https://mmu.vod-qcloud.com/v1认证: VOD ApiToken / Bearer
DeepSeek 是文本生成 / 对话模型,通过兼容 OpenAI 的接口调用,支持 JSON 与 SSE 流式响应。支持 Chat Completions 与 Messages 协议,提供 v4-pro、v4.1-flash 等版本,可按需开启推理(思考)模式。
基本信息
| 项目 | 取值 |
|---|---|
| 调用地址 | https://mmu.vod-qcloud.com |
| 认证 | VOD 应用签发的 ApiToken / Bearer |
| 输出 | 文本 / 结构化响应 |
| 响应方式 | JSON / SSE |
支持的协议
| 规格 | 路径 | 对象 |
|---|---|---|
| Chat Completions | POST /v1/chat/completions | 下方所有模型 |
| Messages | POST /v1/messages | 下方所有模型 |
下方模型 ID 使用对应规格。认证与公共字段遵循 API Reference。
采样选项
对本文档中列出的所有模型通用。
| 参数 | 设置 |
|---|---|
temperature | 可设置 |
top_p | 可设置 |
temperature 指定采样温度,top_p 指定累积概率范围。以一种方式为主进行调整。
各版本推理设置
| 模型 ID | 设置方式 | 停用 |
|---|---|---|
deepseek-v4.1-flash | thinking_enabled | false |
deepseek-v4-pro | thinking_enabled | false |
deepseek-v4-flash | thinking_enabled | false |
deepseek-v3.2 | thinking_enabled | false |
deepseek-flash | thinking_enabled | false |
以 Chat Completions 为基准。推理内容从 reasoning_content 读取,最终答案从 content 读取。对无法停用的版本不传递停用选项。
请求参数
| 参数 | 必填 | 类型 | 说明 |
|---|---|---|---|
model | 必填 | String | 各版本选项表中的模型 ID |
messages | 必填 | Array | Chat Completions / Messages 的对话输入 |
max_tokens | 可选 | Integer | Chat Completions / Messages 的生成上限。在 Messages 中为必填 |
stream | 可选 | Boolean | true:SSE / false:JSON |
请求示例
Chat Completions
json
{
"model": "deepseek-v4.1-flash",
"messages": [
{
"role": "user",
"content": "Reply with exactly OK and nothing else."
}
],
"max_tokens": 2048,
"stream": false,
"reasoning_effort": "low"
}响应
json
{
"id": "01a0de40-cd17-7102-8a8d-82c46dd1e693",
"object": "chat.completion",
"model": "deepseek-flash",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "OK",
"reasoning_content": "We need answer exactly OK and nothing else. Must comply. Final \"OK\"."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 38,
"prompt_tokens_details": {
"audio_tokens": 0,
"cached_tokens": 0
},
"prompt_cached_tokens_details": {
"audio_tokens": 0
},
"completion_tokens": 18,
"completion_tokens_details": {
"accepted_prediction_tokens": 0,
"audio_tokens": 0,
"reasoning_tokens": 16,
"rejected_prediction_tokens": 0
},
"total_tokens": 56
}
}Messages
json
{
"model": "deepseek-v4.1-flash",
"messages": [
{
"role": "user",
"content": "Reply with exactly OK and nothing else."
}
],
"max_tokens": 512,
"stream": false
}响应
json
{
"id": "01a0de32-ad83-7af6-97ee-7b98a0bd1513",
"model": "deepseek-flash",
"type": "message",
"role": "assistant",
"content": [
{
"text": "OK",
"type": "text"
}
],
"stop_reason": "end_turn",
"usage": {
"input_tokens": 38,
"output_tokens": 17
}
}特殊设置
推理与最终答案分别返回在 reasoning_content 与 content 中。将上一轮的最终答案通过 assistant.content 传递以延续对话。thinking_enabled 与 reasoning_effort 的支持按版本适用。
函数调用的 tool_calls.function.arguments 为 JSON 字符串。解析后执行工具,并用对应的 tool_call_id 连接结果。