curl --request POST \
--url https://direct.evolink.ai/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "MiniMax-M3.1-Flash",
"max_tokens": 131072,
"messages": [
{
"role": "user",
"content": "Hello! How can you help me?"
}
]
}
'{
"id": "072514f09a86ce2abb0c5c3930f924fb",
"type": "message",
"role": "assistant",
"model": "MiniMax-M3.1-Flash",
"content": [
{
"thinking": "Let the ball cost x. Then 2x + 1 = 1.10, so x = 0.05.",
"signature": "84eddf556420e0cc237f8f50212216543e8add2ddd931c9a271d2a5a95689333",
"type": "thinking"
},
{
"text": "0.05",
"type": "text"
}
],
"usage": {
"input_tokens": 55,
"output_tokens": 66,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 174,
"output_tokens_details": {
"thinking_tokens": 63
}
},
"stop_reason": "end_turn",
"base_resp": {
"status_code": 0,
"status_msg": ""
}
}MiniMax-M3.1-Flash - Anthropic 兼容接口
- 使用 Anthropic Messages 协议调用 MiniMax-M3.1-Flash 模型
- 请求 / 响应结构与 Anthropic API 对齐
- 多模态对话:
content支持文本、图像、视频内容块 - 系统提示词:通过顶层
system传入 - 思考模式:始终开启,
output_config.effort调节思考深度;思考内容通过content[type=thinking]block 返回 - 流式输出:SSE 事件流
- 工具调用:兼容 Anthropic
tool_use/tool_result流程
流式事件:message_start → content_block_start → content_block_delta(thinking_delta / signature_delta / text_delta / input_json_delta)→ content_block_stop → message_delta → message_stop,期间可能穿插 ping。最终用量以 message_delta 事件中的 usage 为准。
curl --request POST \
--url https://direct.evolink.ai/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "MiniMax-M3.1-Flash",
"max_tokens": 131072,
"messages": [
{
"role": "user",
"content": "Hello! How can you help me?"
}
]
}
'{
"id": "072514f09a86ce2abb0c5c3930f924fb",
"type": "message",
"role": "assistant",
"model": "MiniMax-M3.1-Flash",
"content": [
{
"thinking": "Let the ball cost x. Then 2x + 1 = 1.10, so x = 0.05.",
"signature": "84eddf556420e0cc237f8f50212216543e8add2ddd931c9a271d2a5a95689333",
"type": "thinking"
},
{
"text": "0.05",
"type": "text"
}
],
"usage": {
"input_tokens": 55,
"output_tokens": 66,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 174,
"output_tokens_details": {
"thinking_tokens": 63
}
},
"stop_reason": "end_turn",
"base_resp": {
"status_code": 0,
"status_msg": ""
}
}https://direct.evolink.ai,对文本模型支持更好,支持长连接;https://api.evolink.ai 是多模态主力地址,对文本模型作为备用地址使用。授权
所有接口均需要使用 Bearer Token 进行认证
获取 API Key:
访问 API Key 管理页面 获取您的 API Key
使用时在请求头中添加:
Authorization: Bearer YOUR_API_KEY
备注:EvoLink 对 /v1/messages 统一采用 Bearer Token 鉴权。
请求体
要调用的模型
MiniMax-M3.1-Flash "MiniMax-M3.1-Flash"
对话消息列表,按轮次 user / assistant 交替
说明:
- 至少包含 1 条消息
- 最后一条消息通常为
role=user
1Show child attributes
Show child attributes
生成内容长度上限(Token 数),包含思考和回答
说明:
- 推荐 131,072(128K),最大 524,288(512K)
- 取值过小时可能在思考阶段就达到上限,返回
stop_reason=max_tokens且没有 text 内容
1 <= x <= 524288131072
系统提示词,用于设定 AI 角色与行为。支持字符串或文本内容块数组,通过顶层 system 字段传入。
"You are a helpful assistant."
采样温度
说明:
- 范围
[0, 2],默认 1 - 值越高越发散,越低越确定
- 建议不要同时调整 temperature 与 top_p
0 <= x <= 21
核采样阈值
说明:
- 范围
[0, 1],默认 0.95 - 建议不要同时调整 temperature 与 top_p
0 <= x <= 10.95
是否以 SSE 流式返回
true:Server-Sent Events 流式返回false:完整响应后一次性返回(默认)
false
思考模式。MiniMax-M3.1-Flash 始终进行思考,仅支持 adaptive,可省略。思考内容以 type="thinking" 的 block 返回,按输出 token 计费
Show child attributes
Show child attributes
输出配置
Show child attributes
Show child attributes
工具定义列表
说明:
- 遵循 Anthropic tool 定义规范
input_schema使用 JSON Schema 对象
Show child attributes
Show child attributes
工具选择策略,仅支持 auto(由模型决定是否调用工具)
Show child attributes
Show child attributes
请求元数据
Show child attributes
Show child attributes
响应
消息对象
Anthropic 风格的消息响应
消息唯一 ID
响应对象类型
message assistant 实际使用的模型
"MiniMax-M3.1-Flash"
响应内容块列表
可能包含的 block type:
thinking:思考过程(简单问题可能不产生)text:最终回答文本tool_use:模型发起的工具调用
Show child attributes
Show child attributes
停止原因
end_turn:自然结束max_tokens:达到 max_tokens 上限tool_use:模型触发工具调用
end_turn, max_tokens, tool_use Token 使用统计(Anthropic 规范)
Show child attributes
Show child attributes
状态码和错误详情
Show child attributes
Show child attributes