Appearance
7. 模型示例
说明:按厂商聚合展示;同结构模型共用一组参数与响应示例,差异只补充必要说明。id、request_id、URL 等值均为脱敏示例。
7.1 Qwen
7.1.1 文本(qwen3.6-plus / qwen3.6-flash / qwen3-max / qwen3-coder-next / qwen3-coder-plus)
这 5 个模型结构一致,仅 model 字段不同。
json
{
"model": "qwen3.6-flash",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "请解释一下什么是幂等性。"}
],
"stream": false,
"enable_thinking": true
}参数:
| 字段 | 类型 | 说明 |
|---|---|---|
temperature | number | 采样温度 |
top_p | number | 核采样参数 |
max_tokens / max_completion_tokens | integer | 最大输出长度(max_completion_tokens 同时限制思维链;推荐使用此字段) |
enable_thinking | boolean | 开启/关闭思维链(CoT)模式;传 true 时响应 message 含 reasoning_content |
thinking_budget | integer | 思维链最大 Token 数,超出后截断思维链 |
enable_search | boolean | 开启联网搜索 |
tools / tool_choice | object / string | 工具调用配置 |
响应:
json
{
"id": "chatcmpl-e30f5ae7-3063-93c4-90fe-beb5f900bd57",
"object": "chat.completion",
"created": 1749600000,
"model": "qwen3.6-flash",
"choices": [
{
"index": 0,
"finish_reason": "stop",
"message": {
"role": "assistant",
"reasoning_content": "幂等性的核心是:操作结果不随执行次数的增加而改变。在分布式系统中网络抖动可能导致请求重试,若接口不幂等则重复执行会产生副作用,因此需要通过唯一 key 或状态机来保证幂等性。",
"content": "幂等性是指对同一请求无论执行多少次,结果都与执行一次相同,常用于避免重复操作带来的副作用。"
}
}
],
"usage": {
"prompt_tokens": 14,
"completion_tokens": 185,
"total_tokens": 199,
"prompt_tokens_details": {
"cached_tokens": 0
},
"completion_tokens_details": {
"reasoning_tokens": 148
}
}
}7.1.2 图片(qwen-image-2.0 / qwen-image-2.0-pro / wan2.7-image-pro)
这 3 个模型结构一致,通常同步返回图片结果。
json
{
"model": "qwen-image-2.0-pro",
"messages": [
{"role": "user", "content": "生成一张俯瞰雪山湖泊的超写实照片。"}
],
"images": ["https://example.com/input.webp"],
"size": "1664*928",
"n": 1,
"watermark": false
}参数:
| 参数 | 类型 | 说明 |
|---|---|---|
images | array[string] | 参考图片 URL;不传则纯文生图 |
size | string | 输出尺寸,格式 W*H,如 2048*2048、1664*928 |
n | integer | 生成图片数量,默认 1 |
watermark | boolean | 是否添加水印,默认 false |
响应:
json
{
"output": {
"choices": [
{
"finish_reason": "stop",
"message": {
"role": "assistant",
"content": [
{
"image": "https://example.com/result-image.png"
}
]
}
}
]
},
"usage": {
"image_count": 1
},
"request_id": "3876e0d5-cae0-9f70-bad2-f62e7684a1c8"
}7.1.3 视频(wan2.7-i2v / wan2.7-r2v / wan2.7-t2v)
这 3 个模型均异步返回 task_id,差异在输入媒体组合。
模型差异:
| 模型 | 典型输入 | 说明 |
|---|---|---|
wan2.7-i2v | messages + images 或 videos,可选 voices | 可用首帧图或首段视频驱动生成 |
wan2.7-r2v | messages + images/videos/voices | 参考图、参考视频、参考音频联合生成 |
wan2.7-t2v | messages,可选 voices | 纯文生视频,可附加音频输入 |
示例请求:
wan2.7-i2v
json
{
"model": "wan2.7-i2v",
"messages": [
{"role": "user", "content": "一个由喷漆画成的少年从墙上活过来,边 rap 边摆姿势。"}
],
"images": ["https://example.com/frame.png"],
"voices": ["https://example.com/rap.mp3"],
"media_roles": {
"images": ["first_frame"],
"voices": ["driving_audio"]
},
"duration": 10,
"resolution": "720P"
}也可仅传 videos[0] 作为首段视频输入。
wan2.7-r2v
json
{
"model": "wan2.7-r2v",
"messages": [
{"role": "user", "content": "保持人物造型不变,生成一段轻微转身并微笑的视频。"}
],
"images": ["https://example.com/reference-character.png"],
"videos": ["https://example.com/reference-motion.mp4"],
"voices": ["https://example.com/reference-voice.mp3"],
"duration": 5,
"resolution": "720P"
}wan2.7-t2v
json
{
"model": "wan2.7-t2v",
"messages": [
{"role": "user", "content": "一只橘猫坐在窗边,雨滴缓慢滑落玻璃。"}
],
"voices": ["https://example.com/background-music.mp3"],
"duration": 5,
"resolution": "720P"
}参数:
| 参数 | 类型 | 说明 |
|---|---|---|
images | array[string] | 首帧图或参考图片 |
videos | array[string] | 参考视频 |
voices | array[string] | 驱动音频、参考音频或背景音频 |
media_roles | object | 显式指定媒体角色,见 3. 请求体 |
duration | integer | 视频时长(秒) |
resolution | string | 输出分辨率,如 "720P"、"1080P" |
negative_prompt | string | 否定描述,用于指导模型避免生成的内容 |
响应:
json
{
"output": {
"task_id": "wan-video-task-001",
"task_status": "PENDING"
},
"request_id": "wan-video-req-001",
"task_id": "wan-video-task-001"
}
task_id同时出现在顶层和output内;建议优先使用顶层task_id传入任务查询接口。
7.1.4 语音合成(qwen3-tts-flash)
使用 messages[].content 传入待合成文本;可选传入 voice 和 language_type。
json
{
"model": "qwen3-tts-flash",
"messages": [
{"role": "user", "content": "你好,欢迎使用统一体验端口。"}
],
"voice": "Cherry",
"language_type": "Chinese",
"stream": false
}参数:
| 字段 | 类型 | 说明 |
|---|---|---|
voice | string | 音色名称,默认 Cherry |
language_type | string | 语种,Chinese、English、Auto |
响应:
json
{
"status_code": 200,
"request_id": "206bc4af-3bfe-9d66-a4b9-4f4e806b905e",
"output": {
"audio": {
"url": "https://example.com/audio/206bc4af.wav"
},
"finish_reason": "stop"
},
"usage": {
"characters": 18
}
}7.2 MiniMax
7.2.1 文本(MiniMax-M2.7 / MiniMax-M2.7-highspeed)
这 2 个模型结构一致,仅 model 字段不同。两者均为推理模型,固定返回 reasoning_content;不支持 enable_thinking 和 enable_search。
json
{
"model": "MiniMax-M2.7",
"messages": [
{"role": "system", "content": "你是 MiniMax AI 智能助手。"},
{"role": "user", "content": "你好"}
],
"stream": false,
"max_completion_tokens": 256
}参数:
| 参数 | 类型 | 说明 |
|---|---|---|
stream | boolean | 是否流式输出,默认 false;推理模型建议设为 true |
max_completion_tokens | integer | 最大输出 token 数(含思维链) |
temperature | number | 采样温度(0~1.5) |
top_p | number | 核采样参数 |
tools / tool_choice | object/string | 函数调用配置 |
响应:
json
{
"id": "03d3f5bd571f85faa1d980d2f779630f",
"object": "chat.completion",
"created": 1749600000,
"model": "MiniMax-M2.7",
"choices": [
{
"index": 0,
"finish_reason": "stop",
"message": {
"role": "assistant",
"reasoning_content": "用户对我打招呼,我应以热情友好的方式回应,并表示愿意提供帮助。",
"content": "你好!有什么我可以帮助你的吗?"
}
}
],
"usage": {
"total_tokens": 264,
"total_characters": 0,
"prompt_tokens": 26,
"completion_tokens": 238,
"completion_tokens_details": {
"reasoning_tokens": 228
}
},
"input_sensitive": false,
"output_sensitive": false,
"input_sensitive_type": 0,
"output_sensitive_type": 0,
"base_resp": {
"status_code": 0,
"status_msg": ""
}
}7.2.2 图片(image-01)
使用 messages[].content 提供提示词;images 可作为主体参考图。
json
{
"model": "image-01",
"messages": [
{"role": "user", "content": "生成一张赛博朋克风格的城市夜景海报。"}
],
"images": ["https://example.com/subject.png"],
"n": 1,
"size": "1024x1024"
}参数:
| 参数 | 类型 | 说明 |
|---|---|---|
images | array[string] | 主体参考图 URL |
n | integer | 生成图片数量,默认 1 |
size / aspect_ratio | string | 输出尺寸,如 1024x1024、16:9 |
响应:
json
{
"data": {
"image_url": ["https://example.com/generated-001.png"]
}
}若传入
"response_format": "base64",则响应字段变为data.image_base64。
7.2.3 视频(MiniMax-Hailuo-2.3 / MiniMax-Hailuo-2.3-Fast)
这 2 个模型结构一致,仅 model 不同。若传入 images,第 1 张视为首帧图,第 2 张视为尾帧图。
json
{
"model": "MiniMax-Hailuo-2.3",
"messages": [
{"role": "user", "content": "镜头从海边栈桥缓慢推进到日落中的灯塔。"}
],
"images": [
"https://example.com/first-frame.png",
"https://example.com/last-frame.png"
],
"duration": 6,
"resolution": "1080P"
}参数:
| 参数 | 类型 | 说明 |
|---|---|---|
images | array[string] | 仅支持传 0~2 张;第 1 张为首帧图,第 2 张为尾帧图 |
duration | integer | 视频时长(秒),可选 5 或 6 |
resolution | string | 输出分辨率,如 "720P"、"1080P" |
响应:
json
{
"task_id": "minimax-hailuo-video-task-001"
}7.2.4 语音合成(speech-2.8-hd)
使用 messages[].content 传入待合成文本;voice_id 默认为 male-qn-qingse,可通过 voice_setting.voice_id 覆盖。
json
{
"model": "speech-2.8-hd",
"messages": [
{"role": "user", "content": "欢迎使用 MiniMax 语音合成服务。"}
],
"voice_id": "Boyan_new_hd",
"stream": false
}参数:
| 字段 | 类型 | 说明 |
|---|---|---|
voice_id | string | 音色 ID。若未传,默认 male-qn-qingse |
voice_setting | object | 完整音色配置,优先级高于 voice_id |
audio_setting | object | 音频输出格式配置 |
响应:
json
{
"trace_id": "a0d7352e-3f5a-4bd3-b2f6-8f3e0a1c5d2b",
"data": {
"status": 2,
"audio": "1a2b3c4d...<hex-encoded mp3 bytes>"
},
"extra_info": {
"audio_length": 3200,
"audio_sample_rate": 32000,
"audio_size": 12800,
"audio_bitrate": 128000,
"usage_characters": 16
},
"base_resp": {
"status_code": 0,
"status_msg": "success"
},
"usage": {
"characters": 16
}
}7.3 GLM
7.3.1 文本(glm-5.1)
glm-5.1 为纯文本模型,不支持 images/videos/file_urls/voices。
json
{
"model": "glm-5.1",
"messages": [
{"role": "system", "content": "You are GLM."},
{"role": "user", "content": "用三点总结一下事件驱动架构的优缺点。"}
],
"enable_thinking": true,
"stream": false
}参数:
| 参数 | 类型 | 说明 |
|---|---|---|
stream | boolean | 是否流式输出 |
max_tokens / max_completion_tokens | integer | 最大输出 token 数 |
temperature | number | 采样温度 |
enable_thinking | boolean | 开启思维链模式,响应 message 含 reasoning_content |
enable_search | boolean | 开启联网搜索 |
tools / tool_choice | object/string | 函数调用配置 |
响应:
json
{
"id": "2026050714440173035c127e244bba",
"object": "chat.completion",
"created": 1749600000,
"model": "glm-5.1",
"choices": [
{
"index": 0,
"finish_reason": "stop",
"message": {
"role": "assistant",
"reasoning_content": "先从架构特征拆解:事件驱动架构通过发布/订阅降低耦合,天然支持异步和水平扩展;但也会引入事件顺序、幂等、补偿、可观测性和事件演进等问题。回答时应保持三点总结的结构。",
"content": "事件驱动架构优点:高解耦、可扩展、异步高吞吐。缺点:调试追踪复杂、最终一致性保证难、事件版本管理成本高。"
}
}
],
"usage": {
"prompt_tokens": 22,
"completion_tokens": 38,
"total_tokens": 60
}
}7.3.2 多模态理解(glm-5v-turbo)
支持文本与 images、videos、file_urls 组合输入。
json
{
"model": "glm-5v-turbo",
"messages": [
{"role": "user", "content": "Where is the second bottle of beer from the right on the table?"}
],
"images": ["https://example.com/grounding.png"],
"stream": false
}参数:
| 参数 | 类型 | 说明 |
|---|---|---|
stream | boolean | 是否流式输出,默认 false |
max_completion_tokens / max_tokens | integer | 最大输出 token 数 |
temperature | number | 采样温度 |
images | array[string] | 图片 URL |
videos | array[string] | 视频 URL |
file_urls | array[string] | 文件 URL |
响应:
json
{
"id": "2026050714440173035c127e244bba",
"object": "chat.completion",
"created": 1749600000,
"model": "glm-5v-turbo",
"choices": [
{
"index": 0,
"finish_reason": "stop",
"message": {
"role": "assistant",
"content": "The second bottle is at [[92,601,178,964]]."
}
}
],
"usage": {
"prompt_tokens": 706,
"completion_tokens": 109,
"total_tokens": 815
}
}7.3.3 图片(glm-image)
使用 messages[].content 提供提示词;当前不支持通过 images 传入参考图。
json
{
"model": "glm-image",
"messages": [
{"role": "user", "content": "生成一张未来感办公室的概念图。"}
],
"size": "1024x1024"
}参数:
| 参数 | 类型 | 说明 |
|---|---|---|
size | string | 输出尺寸,如 "1024x1024"、"512x512" |
style | string | 生成风格,如 "vivid"、"natural" |
响应:
json
{
"created": 1749600000,
"data": [
{
"url": "https://example.com/generated-001.png",
"revised_prompt": "未来感办公室概念图:弧形落地窗,全息屏幕,悬浮工位"
}
]
}若额外传入
"async": true,则响应仅含任务 ID,可通过GET /v1/images/generations/{task_id}轮询。
7.3.4 视频(cogvideox-3)
使用 messages[].content 提供提示词;images 可作为 1~4 张参考帧图片。
json
{
"model": "cogvideox-3",
"messages": [
{"role": "user", "content": "从城市街头推镜到远处的霓虹广告牌。"}
],
"images": ["https://example.com/street-frame.png"],
"fps": 24
}参数:
| 参数 | 类型 | 说明 |
|---|---|---|
images | array[string] | 参考帧图片 URL,1~4 张;>4 张时仅使用前 4 张 |
fps | integer | 视频帧率,如 24 |
duration | integer | 视频时长(秒),若模型支持可传 |
响应:
json
{
"id": "cogvideo-task-001",
"task_id": "cogvideo-task-001"
}7.4 Kimi
7.4.1 文本 / 多模态理解(kimi-k2.6)
kimi-k2.6 既可用于纯文本,也可用于多模态理解;响应结构一致,差异主要在是否传入媒体字段。
文本请求示例:
json
{
"model": "kimi-k2.6",
"messages": [
{"role": "system", "content": "You are Kimi, a helpful assistant."},
{"role": "user", "content": "简要说明 RAG 与长上下文记忆的区别。"}
],
"enable_thinking": true,
"stream": false
}多模态请求示例:
json
{
"model": "kimi-k2.6",
"messages": [
{"role": "user", "content": "请总结这份 PDF 的核心结论,并描述图中的关键趋势。"}
],
"images": ["https://example.com/chart.png"],
"file_urls": ["https://example.com/report.pdf"],
"stream": false
}参数:
| 参数 | 类型 | 说明 |
|---|---|---|
images | array[string] | 图片 URL |
videos | array[string] | 视频 URL |
file_urls | array[string] | 文件 URL(如 PDF、Word) |
stream | boolean | 是否流式输出 |
max_tokens / max_completion_tokens | integer | 最大输出 token 数 |
enable_thinking | boolean | 开启思维链模式,响应 message 含 reasoning_content |
enable_search | boolean | 开启联网搜索;传 true 时会强制关闭思考模式 |
reasoning_effort | string | 推理力度,可选值 high / max |
响应:
json
{
"id": "chatcmpl-kimi-vl-001",
"object": "chat.completion",
"created": 1749686400,
"model": "kimi-k2.6",
"choices": [
{
"index": 0,
"finish_reason": "stop",
"message": {
"role": "assistant",
"reasoning_content": "用户上传了图片和 PDF,需要分别从视觉内容和文档内容提炼结论;先概括 PDF 的核心结论,再结合图表描述趋势,最后输出一句简洁摘要。",
"content": "PDF 的核心结论是营收增速高于利润增速;图表显示二季度后转化率明显上升。"
}
}
],
"usage": {
"prompt_tokens": 862,
"completion_tokens": 42,
"total_tokens": 904
}
}7.5 DeepSeek
7.5.1 文本(deepseek-v4-pro / deepseek-v4-flash)
这 2 个模型结构一致,仅 model 字段不同;enable_search 对两者都不生效。
deepseek-v4-pro
json
{
"model": "deepseek-v4-pro",
"messages": [
{"role": "user", "content": "请给我一个 Go 并发最佳实践清单。"}
],
"enable_thinking": true,
"stream": false
}deepseek-v4-flash
json
{
"model": "deepseek-v4-flash",
"messages": [
{"role": "user", "content": "请用五条要点总结一下缓存穿透的应对策略。"}
],
"enable_thinking": false,
"stream": false
}参数:
| 参数 | 类型 | 说明 |
|---|---|---|
stream | boolean | 是否流式输出,默认 false |
enable_thinking | boolean | 开启思维链模式;若关闭,则响应中通常不返回 reasoning_content |
max_tokens / max_completion_tokens | integer | 最大输出 token 数 |
temperature | number | 采样温度 |
reasoning_effort | string | 推理力度,可选值 high / max |
注意:
enable_search对 DeepSeek 不生效,传入不产生任何效果。
响应:
json
{
"id": "chatcmpl-deepseek-001",
"object": "chat.completion",
"created": 1749600000,
"model": "deepseek-v4-pro",
"system_fingerprint": "fp_a1b2c3d4e5",
"choices": [
{
"index": 0,
"finish_reason": "stop",
"message": {
"role": "assistant",
"reasoning_content": "Go 并发最佳实践涉及三个核心维度:goroutine 生命周期管理(避免泄漏)、context 取消传播(统一超时与取消语义)、同步原语选择(channel 传递所有权,mutex 保护共享状态)。",
"content": "1) 控制 goroutine 生命周期 2) 使用 context 做取消传播 3) 通过 channel 或 mutex 明确同步边界。"
}
}
],
"usage": {
"prompt_tokens": 22,
"completion_tokens": 54,
"total_tokens": 76
}
}7.6 任务查询示例
说明:任务查询接口用于轮询异步图片/视频任务。接入时建议注意:
- 任务查询响应直接返回该模型的实际结果结构;不同模型的字段命名和状态值存在差异,请以实际响应为准,不要假设跨模型结构一致。
- 本文档未承诺任务结果的保留时长;建议在获得终态后尽快拉取并保存结果。
视频任务查询请求:
http
GET /v1/videos/generations/{task_id}视频任务查询响应:
json
{
"output": {
"task_id": "b9746661-4596-4772-b17c-552adcc6433e",
"task_status": "SUCCEEDED",
"video_url": "https://example.com/result-4fe3a2b1.mp4"
},
"request_id": "13707415-4571-90f8-b5b8-59d6b6b15d05"
}图片任务查询请求:
http
GET /v1/images/generations/{task_id}图片任务查询响应:
json
{
"output": {
"task_id": "2f3a4b5c-6d7e-8f90-abcd-ef1234567890",
"task_status": "SUCCEEDED",
"results": [
{
"url": "https://example.com/result-image.png",
"orig_prompt": "一片宁静的竹林,清晨薄雾,写实风格。"
}
]
},
"request_id": "a1b2c3d4-e5f6-7890-abcd-ef0987654321"
}7.7 常见字段适用范围总表
以下表格仅描述调用方应如何组织请求:
| 统一请求字段 | 文本 | 图片生成 | 视频生成 | 多模态理解 | 语音合成 |
|---|---|---|---|---|---|
messages[].content | 对话内容 | 提示词 | 提示词 | 可与媒体共同描述任务 | 待合成文本 |
images[] | 不支持(除 GLM/Kimi 多模态) | 可选参考图 | 部分模型支持 | 支持 | 不支持 |
videos[] | 不支持(除 GLM/Kimi 多模态) | 不支持 | 部分模型支持 | 支持 | 不支持 |
file_urls[] | 不支持(除 GLM/Kimi 多模态) | 不支持 | 不支持 | 支持 | 不支持 |
voices[] | 不支持 | 不支持 | 部分模型支持音频输入 | 不支持 | 不支持 |
voice / voice_id | 不建议使用 | 不支持 | 不支持 | 不支持 | 用于指定音色 |