curl --request POST \
--url https://direct.evolink.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "qwen3.8-max",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "你好,介绍一下你自己"
}
]
}
'
{
"id": "chatcmpl-xxxxxxxx",
"object": "chat.completion",
"created": 1735120033,
"model": "qwen3.8-max",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "你好!我是通义千问 Qwen3.8-Max。",
"reasoning_content": "<string>",
"tool_calls": [
{}
]
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 3019,
"completion_tokens": 104,
"total_tokens": 3123,
"completion_tokens_details": {
"reasoning_tokens": 0
},
"prompt_tokens_details": {
"cached_tokens": 2048,
"cache_creation_input_tokens": 0
}
}
}{
"error": {
"code": 400,
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": 401,
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": 402,
"message": "Insufficient credits",
"type": "insufficient_quota"
}
}{
"error": {
"code": 429,
"message": "Rate limit exceeded",
"type": "rate_limit_error"
}
}{
"error": {
"code": 500,
"message": "Internal server error",
"type": "server_error"
}
}Chat Completions API
Qwen3.8-Max - 完整参数文档
- 使用 OpenAI Chat Completions 协议调用 Qwen3.8-Max
- 多轮对话:支持单轮或多轮上下文对话
- 系统提示词:通过
role=system消息设定 AI 角色与行为 - 多模态输入:
content传 content part 数组,支持text/image_url/input_audio/video_url - 上下文缓存:在 content part 上加
cache_control声明显式缓存;命中情况见响应usage.prompt_tokens_details - 思考模式:
enable_thinking=true开启,思考内容通过reasoning_content返回 - 流式输出:
stream=true时通过 SSE 逐块返回
POST
/
v1
/
chat
/
completions
curl --request POST \
--url https://direct.evolink.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "qwen3.8-max",
"messages": [
{
"role": "system",
"content": "You are a helpful assistant."
},
{
"role": "user",
"content": "你好,介绍一下你自己"
}
]
}
'
{
"id": "chatcmpl-xxxxxxxx",
"object": "chat.completion",
"created": 1735120033,
"model": "qwen3.8-max",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "你好!我是通义千问 Qwen3.8-Max。",
"reasoning_content": "<string>",
"tool_calls": [
{}
]
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 3019,
"completion_tokens": 104,
"total_tokens": 3123,
"completion_tokens_details": {
"reasoning_tokens": 0
},
"prompt_tokens_details": {
"cached_tokens": 2048,
"cache_creation_input_tokens": 0
}
}
}{
"error": {
"code": 400,
"message": "Invalid request parameters",
"type": "invalid_request_error"
}
}{
"error": {
"code": 401,
"message": "Invalid or expired token",
"type": "authentication_error"
}
}{
"error": {
"code": 402,
"message": "Insufficient credits",
"type": "insufficient_quota"
}
}{
"error": {
"code": 429,
"message": "Rate limit exceeded",
"type": "rate_limit_error"
}
}{
"error": {
"code": 500,
"message": "Internal server error",
"type": "server_error"
}
}BaseURL 说明:默认 BaseURL 为
https://direct.evolink.ai,对文本模型支持更好,支持长连接;https://api.evolink.ai 是多模态主力地址,含图像 / 音频 / 视频输入时请使用该地址。授权
##所有接口均需要使用 Bearer Token 进行认证##
获取 API Key:
访问 API Key 管理页面 获取您的 API Key
使用时在请求头中添加:
Authorization: Bearer YOUR_API_KEY
请求体
application/json
对话模型名称
可用选项:
qwen3.8-max 示例:
"qwen3.8-max"
messages
(System Message · object | User Message · object | Assistant Message · object | Tool Message · object)[]
必填
对话消息列表,支持多轮对话。不同角色(system / user / assistant / tool)的消息字段结构不同,请选择对应角色查看。
- System Message
- User Message
- Assistant Message
- Tool Message
Show child attributes
Show child attributes
是否开启深度思考
true:模型输出思考过程,通过reasoning_content返回false(默认):不输出思考过程
注:部分模型在非流式调用下需显式设置为
true才返回思考内容。
采样温度,控制输出随机性。较低值更确定、较高值更多样。取值范围 [0, 2]。建议 temperature 与 top_p 不要同时调整。
必填范围:
0 <= x <= 2核采样(Nucleus Sampling)参数,从累积概率前若干 token 中采样。取值范围 (0, 1]。建议不要同时调整 temperature 和 top_p。
必填范围:
0 <= x <= 1生成内容长度上限(Token 数),包含思维链和回答。思考类模型推荐使用该参数。默认值与最大值均为模型最大输出长度;超出后以 finish_reason=length 提前停止。
旧版生成长度限制参数。
已弃用:新接入请改用
max_completion_tokens。该参数仅限制回答部分(不含思维链)。
是否以流式方式返回响应。
true:通过 SSE(Server-Sent Events)逐块返回false(默认):一次性返回完整响应
流式响应选项,仅在 stream=true 时有效。
Show child attributes
Show child attributes
工具定义列表,用于 Function Calling。每个工具需定义名称、描述与参数 schema。
Show child attributes
Show child attributes