Skip to main content
POST

授权

Authorization
string
header
必填

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

请求体

application/json
model
enum<string>
必填

AnyFast 模型 ID。

可用选项:
qwen3.6-plus
示例:

"qwen3.6-plus"

messages
object[]
必填

对话消息列表。内容可以是文本,或文本、图片和视频部分的数组。

Minimum array length: 1
max_completion_tokens
integer
默认值:65536

最大生成 Token 数。Qwen3.6-Plus 最多支持 64K 输出 Token。

必填范围: 1 <= x <= 65536
temperature
number
默认值:1

采样温度,有效范围为 [0, 2)。temperaturetop_p 二选一。

必填范围: 0 <= x < 2
示例:

1

top_p
number

核采样概率,有效范围为 (0, 1]。temperaturetop_p 二选一。

必填范围: 0 < x <= 1
stream
boolean
默认值:false

为 true 时通过 Server-Sent Events 返回增量结果。

stream_options
object

流式响应选项,仅在 stream 为 true 时生效。

stop
string[]

停止序列数组。当前 AnyFast 接口不支持单个字符串格式。

seed
integer

用于提高采样结果可复现性的随机种子。

必填范围: 0 <= x <= 2147483647
presence_penalty
number
默认值:0

根据 Token 是否已出现控制重复内容。

必填范围: -2 <= x <= 2
frequency_penalty
number
默认值:0

根据 Token 出现频率控制重复内容。

必填范围: -2 <= x <= 2
enable_thinking
boolean

思考模式控制字段。使用 OpenAI SDK 时通过 extra_body 传递。结构化输出或工具调用需要时使用非思考模式。

tools
object[]

应用定义的函数或模型支持的工具。

tool_choice

控制是否调用工具或指定调用的函数。

可用选项:
none,
auto,
required
response_format
object

结构化输出配置。上游模型要求时请使用非思考模式。

响应

请求成功。stream 为 false 时返回完整响应,stream 为 true 时返回流式响应块。

id
string
必填
示例:

"chatcmpl-abc123"

object
enum<string>
必填
可用选项:
chat.completion
created
integer
必填

Unix 时间戳。

model
string
必填
示例:

"qwen3.6-plus"

choices
object[]
必填
usage
object