curl --request POST \
--url https://direct.evolink.ai/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "qwen3.8-max",
"max_tokens": 1024,
"system": "You are a helpful assistant.",
"messages": [
{
"role": "user",
"content": "你好,介绍一下你自己"
}
]
}
'{
"id": "msg_xxxxxxxx",
"type": "message",
"role": "assistant",
"model": "qwen3.8-max",
"content": [
{
"type": "text",
"text": "你好!我是通义千问 Qwen3.8-Max。"
}
],
"stop_reason": "end_turn",
"usage": {
"input_tokens": 12,
"output_tokens": 104,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0
}
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "max_tokens is required"
}
}{
"type": "error",
"error": {
"type": "authentication_error",
"message": "Invalid or expired token"
}
}{
"type": "error",
"error": {
"type": "insufficient_quota",
"message": "Insufficient credits"
}
}{
"type": "error",
"error": {
"type": "<string>",
"message": "<string>"
}
}{
"type": "error",
"error": {
"type": "<string>",
"message": "<string>"
}
}Qwen3.8-Max - Anthropic 兼容接口
- 使用 Anthropic Messages 协议调用 Qwen3.8-Max
- 系统提示词:通过顶层
system字段设定(不放在 messages 内) - 多模态输入:
content传内容块数组,支持text/image - 上下文缓存:在内容块上加
cache_control声明显式缓存;命中 / 创建见响应usage.cache_read_input_tokens/usage.cache_creation_input_tokens - 思考模式:通过
thinking开启,思考以thinking内容块流式返回 - 流式输出:
stream=true时按 Anthropic SSE 事件(message_start/content_block_delta/message_delta等)返回
curl --request POST \
--url https://direct.evolink.ai/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "qwen3.8-max",
"max_tokens": 1024,
"system": "You are a helpful assistant.",
"messages": [
{
"role": "user",
"content": "你好,介绍一下你自己"
}
]
}
'{
"id": "msg_xxxxxxxx",
"type": "message",
"role": "assistant",
"model": "qwen3.8-max",
"content": [
{
"type": "text",
"text": "你好!我是通义千问 Qwen3.8-Max。"
}
],
"stop_reason": "end_turn",
"usage": {
"input_tokens": 12,
"output_tokens": 104,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0
}
}{
"type": "error",
"error": {
"type": "invalid_request_error",
"message": "max_tokens is required"
}
}{
"type": "error",
"error": {
"type": "authentication_error",
"message": "Invalid or expired token"
}
}{
"type": "error",
"error": {
"type": "insufficient_quota",
"message": "Insufficient credits"
}
}{
"type": "error",
"error": {
"type": "<string>",
"message": "<string>"
}
}{
"type": "error",
"error": {
"type": "<string>",
"message": "<string>"
}
}https://direct.evolink.ai,对文本模型支持更好,支持长连接;https://api.evolink.ai 是多模态主力地址,含图像输入时请使用该地址。授权
##所有接口均需要使用 Bearer Token 进行认证##
获取 API Key:
访问 API Key 管理页面 获取您的 API Key
使用时在请求头中添加:
Authorization: Bearer YOUR_API_KEY
请求体
对话模型名称
qwen3.8-max "qwen3.8-max"
生成内容的最大 token 数。
必填(Anthropic 协议要求)。若模型生成超过该值将被截断。
1024
对话消息列表(不含 system)。每条消息含 role(user / assistant)与 content(字符串或内容块数组)。
Show child attributes
Show child attributes
系统提示词。纯文本时传字符串;需声明显式缓存时传内容块数组(在块上加 cache_control)。
采样温度,取值范围 [0, 2]。
0 <= x <= 2核采样参数,取值范围 (0, 1]。
0 <= x <= 1从概率最高的 K 个 token 中采样。
自定义停止序列,命中后停止生成。
是否以 Anthropic SSE 事件流式返回。
深度思考配置。开启后模型以 thinking 内容块返回思考过程。
Show child attributes
Show child attributes
工具定义列表(Anthropic tools 格式),用于 Function Calling。
Show child attributes
Show child attributes
响应
生成成功
"msg_xxxxxxxx"
"message"
"assistant"
"qwen3.8-max"
回复内容块数组
Show child attributes
Show child attributes
停止原因:end_turn(正常结束)、max_tokens(达到上限)、stop_sequence(命中停止序列)、tool_use(需要调用工具)
"end_turn"
Token 使用统计(Anthropic 语义:input_tokens 不含缓存,与 cache 字段互斥相加)。
Show child attributes
Show child attributes