Skip to main content
POST

授权

Authorization
string
header
必填

在请求头中传入 Authorization: Bearer <token>

请求体

application/json
model
enum<string>
必填

模型名称。仅支持当前阿里渠道最终白名单中的公开对话模型。

可用选项:
qwen3-max
示例:

"qwen3.6-plus"

messages
object[]
必填

对话消息列表。支持文本内容。

stream
boolean
默认值:true

是否使用流式输出。默认为 false。

temperature
number
默认值:0.7

采样温度,控制输出随机性。取值范围 [0, 2]。

必填范围: 0 <= x <= 2
top_p
number
默认值:0.95

核采样概率阈值。

必填范围: 0 <= x <= 1
max_tokens
integer

生成的最大 token 数。

必填范围: x >= 1
stop
string[]

停止词列表。

seed
integer

随机数种子,用于复现生成结果。

tools
object[]

工具列表,用于 Function Calling。

tool_choice
string

工具选择策略。可选值:auto、none、required。

是否启用搜索增强功能。仅部分模型支持。

response_format
object

响应格式,用于强制模型输出 JSON。

响应

调用成功,返回对话补全结果。流式模式下返回 SSE 流。

id
string

响应唯一标识。

object
string
示例:

"chat.completion"

created
integer<int64>

创建时间的 Unix 时间戳(秒)。

model
string

使用的模型名称。

choices
object[]
usage
object