curl --request POST \
--url https://direct.evolink.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "MiniMax-M3.1-Flash",
"messages": [
{
"role": "user",
"content": "Please introduce yourself."
}
],
"max_completion_tokens": 131072
}
'{
"id": "072514edea627212c7e226a55bcf4e2e",
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "0.05",
"role": "assistant",
"name": "MiniMax AI",
"audio_content": "",
"reasoning_content": "Let the ball cost x. Then 2x + 1 = 1.10, so x = 0.05."
}
}
],
"created": 1792401901,
"model": "MiniMax-M3.1-Flash",
"object": "chat.completion",
"usage": {
"total_tokens": 281,
"total_characters": 0,
"prompt_tokens": 229,
"completion_tokens": 52,
"completion_tokens_details": {
"reasoning_tokens": 49
},
"prompt_tokens_details": {
"cached_tokens": 187
}
},
"input_sensitive": false,
"output_sensitive": false,
"input_sensitive_type": 0,
"output_sensitive_type": 0,
"output_sensitive_int": 0,
"base_resp": {
"status_code": 0,
"status_msg": ""
}
}MiniMax-M3.1-Flash - OpenAI 兼容接口
- 使用 OpenAI Chat Completions 协议调用 MiniMax-M3.1-Flash 模型
- 多轮对话:支持单轮或多轮上下文对话
- 系统提示词:通过
role=system消息自定义 AI 的角色和行为 - 多模态输入:
content支持文本 + 图像 / 视频混排 - 思考模式:始终开启,
reasoning_effort调节思考深度;思考内容通过reasoning_content返回,content只包含最终回答 - 流式输出:支持 SSE 流式返回
- 工具调用:支持 Function Calling
流式响应说明:当 stream=true 时,通过 Server-Sent Events 返回,每条消息格式为 data: {JSON},结束时返回 data: [DONE]。choices[].delta 先增量返回 reasoning_content,再增量返回 content / tool_calls;设置 stream_options.include_usage=true 时,结束前额外返回一个包含 usage 的数据块。
curl --request POST \
--url https://direct.evolink.ai/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "MiniMax-M3.1-Flash",
"messages": [
{
"role": "user",
"content": "Please introduce yourself."
}
],
"max_completion_tokens": 131072
}
'{
"id": "072514edea627212c7e226a55bcf4e2e",
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "0.05",
"role": "assistant",
"name": "MiniMax AI",
"audio_content": "",
"reasoning_content": "Let the ball cost x. Then 2x + 1 = 1.10, so x = 0.05."
}
}
],
"created": 1792401901,
"model": "MiniMax-M3.1-Flash",
"object": "chat.completion",
"usage": {
"total_tokens": 281,
"total_characters": 0,
"prompt_tokens": 229,
"completion_tokens": 52,
"completion_tokens_details": {
"reasoning_tokens": 49
},
"prompt_tokens_details": {
"cached_tokens": 187
}
},
"input_sensitive": false,
"output_sensitive": false,
"input_sensitive_type": 0,
"output_sensitive_type": 0,
"output_sensitive_int": 0,
"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
请求体
对话模型名称
MiniMax-M3.1-Flash "MiniMax-M3.1-Flash"
对话消息列表,支持多轮对话
不同角色的消息具有不同的字段结构,请选择对应角色查看
1- System Message
- User Message
- Assistant Message
- Tool Message
Show child attributes
Show child attributes
思考深度,默认 max。较高档位通常会增加思考 token 消耗和响应时间。
low, medium, high, xhigh, max "high"
思考模式。MiniMax-M3.1-Flash 始终进行思考,仅支持 adaptive,可省略
Show child attributes
Show child attributes
思考内容是否单独返回。仅支持 true,思考内容通过 reasoning_content 返回,可省略
true 采样温度,控制输出的随机性
说明:
- 取值范围
[0, 2],默认 1 - 较低值输出更确定,较高值输出更多样
建议:不要同时调整 temperature 和 top_p
0 <= x <= 21
核采样(Nucleus Sampling)参数
说明:
- 控制从累积概率前多少的 token 中采样
- 例如 0.95 表示从累积概率达到 95% 的 token 中选择
- 取值范围
[0, 1],默认 0.95
建议:不要同时调整 temperature 和 top_p
0 <= x <= 10.95
生成内容长度上限(Token 数),包含思考和回答
说明:
- 推荐 131,072(128K),最大 524,288(512K)
- 取值过小时可能在思考阶段就达到上限,返回
finish_reason=length且content为空
1 <= x <= 524288131072
是否以流式方式返回响应
true:流式返回,通过 SSE(Server-Sent Events)逐块实时返回内容false:等待完整响应后一次性返回(默认)
false
流式响应选项
仅在 stream=true 时有效
Show child attributes
Show child attributes
工具定义列表,用于 Function Calling
每个工具需要定义名称、描述和参数 schema
Show child attributes
Show child attributes
工具选择策略,仅支持 auto(由模型决定是否调用工具)
auto 旧版生成长度限制参数
说明:已弃用,请改用 max_completion_tokens
x >= 1生成的回复数量,仅支持 1
1 响应
对话生成成功
对话完成的唯一标识符
"0668a381bdc3c0ded310e27c9a46d16e7"
实际使用的模型名称
"MiniMax-M3.1-Flash"
响应类型
chat.completion "chat.completion"
创建时间戳(Unix 秒)
1777026807
对话生成的选择列表
Show child attributes
Show child attributes
Token 使用统计信息
Show child attributes
Show child attributes
输入内容是否命中敏感词。若输入严重违规,接口会返回内容违规错误,回复内容为空
输入命中敏感词类型(input_sensitive 为 true 时返回):1 严重违规;2 色情;3 广告;4 违禁;5 谩骂;6 暴恐;7 其他
输出内容是否命中敏感词
输出命中敏感词类型
状态码和错误详情
Show child attributes
Show child attributes
输出命中敏感词类型的数值标识