curl --request POST \
--url https://direct.evolink.ai/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "MiniMax-M3",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "你好,世界"
}
]
}
'
{
"id": "066a381bdc3c0ded310e27c9a46d16e7",
"type": "message",
"role": "assistant",
"model": "MiniMax-M3",
"content": [
{
"type": "thinking",
"thinking": "用户问的是日本首都,这是基础地理知识问题,答案是东京,直接给出即可。",
"signature": "066a381bdc3c0ded310e27c9a46d16e7"
},
{
"type": "text",
"text": "日本的首都是**东京**。"
}
],
"stop_reason": "end_turn",
"usage": {
"input_tokens": 7,
"output_tokens": 77,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0
}
}
Messages API
MiniMax-M3 - Anthropic 兼容接口
- 使用 Anthropic Messages 协议调用 MiniMax-M3 模型
- 请求 / 响应结构与 Anthropic API 对齐
- 多模态对话:
content支持文本与图像内容块 - 系统提示词:通过顶层
system传入 - 思考模式:
thinking对象控制;思考内容通过content[type=thinking]block 返回 - 流式输出:SSE 事件流
- 工具调用:兼容 Anthropic
tool_use/tool_result流程
POST
/
v1
/
messages
curl --request POST \
--url https://direct.evolink.ai/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "MiniMax-M3",
"max_tokens": 1024,
"messages": [
{
"role": "user",
"content": "你好,世界"
}
]
}
'
{
"id": "066a381bdc3c0ded310e27c9a46d16e7",
"type": "message",
"role": "assistant",
"model": "MiniMax-M3",
"content": [
{
"type": "thinking",
"thinking": "用户问的是日本首都,这是基础地理知识问题,答案是东京,直接给出即可。",
"signature": "066a381bdc3c0ded310e27c9a46d16e7"
},
{
"type": "text",
"text": "日本的首都是**东京**。"
}
],
"stop_reason": "end_turn",
"usage": {
"input_tokens": 7,
"output_tokens": 77,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0
}
}
BaseURL 说明:默认 BaseURL 为
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 鉴权。
请求体
application/json
要调用的模型
可用选项:
MiniMax-M3 示例:
"MiniMax-M3"
对话消息列表,按轮次 user / assistant 交替
说明:
- 至少包含 1 条消息
- 最后一条消息通常为
role=user
Minimum array length:
1Show child attributes
Show child attributes
指定生成内容长度的上限(Token 数)
说明:
- MiniMax-M3 推荐 131,072(128K),上限 524,288(512K)
- thinking 产生的 token 也计入该上限
- 超过上限的内容会被截断;如果生成因
length原因中断,请尝试调高此值
必填范围:
1 <= x <= 524288示例:
1024
系统提示词,用于设定 AI 角色与行为
说明:
- 支持字符串或字符串数组
- 通过顶层
system字段传入
示例:
"You are a helpful assistant."
采样温度
说明:
- 范围
[0, 2] - 默认 1;值越高越发散,越低越确定
必填范围:
0 <= x <= 2示例:
1
核采样阈值
说明:
- 范围
[0, 1],MiniMax-M3 默认 0.95 - 建议不要同时调整 temperature 与 top_p
必填范围:
0 <= x <= 1示例:
0.95
是否以 SSE 流式返回
true:Server-Sent Events 流式返回false:完整响应后一次性返回(默认)
示例:
false
控制深度思考。启用 thinking 后,多轮对话中需要原样回带 thinking 块
说明:
- 默认
adaptive:模型根据问题难度自适应决定是否深度思考 - 启用时响应
content数组中会出现type="thinking"的推理过程 block(按输出 token 计费)
Show child attributes
Show child attributes
工具定义列表
说明:
- 遵循 Anthropic tool 定义规范
input_schema使用 JSON Schema 对象
Show child attributes
Show child attributes
工具选择策略。仅支持 auto 和 none
Show child attributes
Show child attributes
请求元数据
Show child attributes
Show child attributes
响应
消息对象
Anthropic 风格的消息响应
消息唯一 ID
响应对象类型
可用选项:
message 可用选项:
assistant 实际使用的模型
示例:
"MiniMax-M3"
响应内容块列表
可能包含的 block type:
thinking:推理过程(仅 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