curl --request POST \
--url https://direct.evolink.ai/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "MiniMax-M4",
"input": "Please introduce yourself in one sentence.",
"max_output_tokens": 4096
}
'{
"id": "example_ae5b7d",
"object": "response",
"created_at": 1792405562,
"model": "MiniMax-M3.1-Flash",
"status": "completed",
"output": [
{
"id": "example_ae5b7d_rs",
"type": "reasoning",
"status": "completed",
"summary": [],
"content": [
{
"type": "reasoning_text",
"text": "We need solve CRT. Need only n. Compute. n=3 mod7, 5 mod11,7 mod13. Product 1001. Let's solve.\n\nUse n=3+7a. mod11: 3+7a=5 =>7a=2 mod11. inverse7=8 (56=1), a=16=5 mod11. a=5+11b. n=38+77b. mod13: 38+77b = 12+12b mod13 (77=12,38=12) equals7 =>12b=-5=8 mod13. inverse12=12, b=96 mod13 =5? 91 remainder5. n=38+385=423. Check 423 mod7 3 (420), mod11 5 (418), mod13 7 (416). Smallest positive 423. Only n."
}
],
"encrypted_content": "EXAMPLE_ENCRYPTED_CONTENT"
},
{
"id": "example_ae5b7d_msg",
"type": "message",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "423",
"annotations": []
}
]
}
],
"output_text": "423",
"usage": {
"input_tokens": 239,
"output_tokens": 190,
"total_tokens": 429,
"input_tokens_details": {
"cached_tokens": 174
},
"output_tokens_details": {
"reasoning_tokens": 189
}
},
"error": null,
"incomplete_details": null
}Responses 接口
MiniMax 全模型接口 - Responses 快速开始
使用 model 与 input 调用 MiniMax,支持 MiniMax-M4 与 MiniMax-M3.1-Flash。建议设置 max_output_tokens 为 1024 或更高,为思考和正文预留空间。
更多示例见完整参数文档。
POST
/
v1
/
responses
curl --request POST \
--url https://direct.evolink.ai/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "MiniMax-M4",
"input": "Please introduce yourself in one sentence.",
"max_output_tokens": 4096
}
'{
"id": "example_ae5b7d",
"object": "response",
"created_at": 1792405562,
"model": "MiniMax-M3.1-Flash",
"status": "completed",
"output": [
{
"id": "example_ae5b7d_rs",
"type": "reasoning",
"status": "completed",
"summary": [],
"content": [
{
"type": "reasoning_text",
"text": "We need solve CRT. Need only n. Compute. n=3 mod7, 5 mod11,7 mod13. Product 1001. Let's solve.\n\nUse n=3+7a. mod11: 3+7a=5 =>7a=2 mod11. inverse7=8 (56=1), a=16=5 mod11. a=5+11b. n=38+77b. mod13: 38+77b = 12+12b mod13 (77=12,38=12) equals7 =>12b=-5=8 mod13. inverse12=12, b=96 mod13 =5? 91 remainder5. n=38+385=423. Check 423 mod7 3 (420), mod11 5 (418), mod13 7 (416). Smallest positive 423. Only n."
}
],
"encrypted_content": "EXAMPLE_ENCRYPTED_CONTENT"
},
{
"id": "example_ae5b7d_msg",
"type": "message",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "423",
"annotations": []
}
]
}
],
"output_text": "423",
"usage": {
"input_tokens": 239,
"output_tokens": 190,
"total_tokens": 429,
"input_tokens_details": {
"cached_tokens": 174
},
"output_tokens_details": {
"reasoning_tokens": 189
}
},
"error": null,
"incomplete_details": null
}BaseURL 说明:默认 BaseURL 为
https://direct.evolink.ai,对文本模型支持更好,支持长连接;https://api.evolink.ai 是多模态主力地址,对文本模型作为备用地址使用。POST /v1/responses,通过 model 选择 MiniMax-M4 或 MiniMax-M3.1-Flash。最少需要 model 和 input;示例额外设置输出上限,便于直接开始。
只支持
MiniMax-M4 与 MiniMax-M3.1-Flash:MiniMax-M3、MiniMax-M2.5 请使用 Chat Completions 或 Messages 接口。参数名称与 Chat Completions 不同:输入使用 input,输出上限使用 max_output_tokens,思考深度使用 reasoning.effort(low / medium / high / xhigh / max,默认 max)。两个模型都始终思考,传入 reasoning.effort: "none" 会返回 400 错误。读取正文
响应的output 可能同时包含思考、正文和工具调用。遍历 type="message" 中的 output_text 内容块,不要假设第一项就是正文。
假设已将响应 JSON 解析为 response,可以这样提取文本:
text = "".join(
part["text"]
for item in response.get("output", [])
if item.get("type") == "message"
for part in item.get("content", [])
if part.get("type") == "output_text"
)
print(text)
为思考预留输出预算:
max_output_tokens 包含思考与正文,建议从 1024 起按任务调整,最大值 MiniMax-M4 为 262,144、MiniMax-M3.1-Flash 为 524,288。若 status="incomplete" 且 incomplete_details.reason="max_output_tokens",请调高上限;预算耗尽时可能只有思考项,没有正文。授权
所有接口均需要使用 Bearer Token 进行认证
获取 API Key:
访问 API Key 管理页面 获取您的 API Key
使用时在请求头中添加:
Authorization: Bearer YOUR_API_KEY
请求体
application/json
必填。纯文本字符串按一条 user 消息处理。多轮对话、图像与视频输入、工具调用请使用输入项数组,见完整参数文档。
示例:
"Explain recursion in one sentence."
响应
生成成功
Responses 接口的响应对象。除下列字段外,响应还会回显本次请求的配置(tools、tool_choice、temperature、top_p、text、reasoning、max_output_tokens 等)。