curl --request POST \
--url https://api.minimax.cn/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--data '
{
"model": "MiniMax-M3.1-Flash",
"thinking": {
"type": "adaptive"
},
"messages": [
{
"role": "user",
"content": "9.11 和 9.9 哪个更大?"
}
],
"max_completion_tokens": 500,
"reasoning_effort": "max"
}
'
{
"id": "066b36619b147e326d17053cccdef70f",
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "**9.9 更大。**\n\n比较方法很简单:把小数位数对齐:\n\n- 9.11 = 9.11\n- 9.90 = 9.9\n\n整数部分都是 9,所以比较小数部分:90 > 11,因此 **9.9 > 9.11**。\n\n---\n\n这是一个经典的小数比较问题,容易被混淆的原因在于:如果按**字符串**逐字符比较,\"9.9\"中的 '9' 会大于 \"9.11\"中的 '1',从而得出相反的结论。但在**数值**上,9.9 = 9.90 显然大于 9.11。",
"reasoning_content": "The user is asking which is larger: 9.11 or 9.9.\n\nLet me compare these two numbers:\n- 9.11\n- 9.9 = 9.90\n\nComparing 9.11 and 9.90:\n- The integer parts are both 9.\n- Compare the decimal parts: 11 vs 90 (treating as cents: 0.11 vs 0.90)\n- 90 > 11, so 9.9 > 9.11\n\nThis is actually a famous question that is sometimes used to trick people who might confuse string comparison with numerical comparison (since \"9.11\" > \"9.9\" as strings, but numerically 9.9 > 9.11).\n\nThe answer is straightforward: 9.9 is larger.",
"role": "assistant",
"name": "MiniMax AI",
"audio_content": ""
}
}
],
"created": 1780220769,
"model": "MiniMax-M3.1-Flash",
"object": "chat.completion",
"usage": {
"total_tokens": 473,
"total_characters": 0,
"prompt_tokens": 170,
"completion_tokens": 303,
"prompt_tokens_details": {
"cached_tokens": 157
}
},
"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": ""
}
}
OpenAI Chat Completions API
对话补全
通过兼容 OpenAI Chat Completions API 的接口调用 MiniMax 模型生成回复,支持流式与非流式。
POST
/
v1
/
chat
/
completions
curl --request POST \
--url https://api.minimax.cn/v1/chat/completions \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--data '
{
"model": "MiniMax-M3.1-Flash",
"thinking": {
"type": "adaptive"
},
"messages": [
{
"role": "user",
"content": "9.11 和 9.9 哪个更大?"
}
],
"max_completion_tokens": 500,
"reasoning_effort": "max"
}
'
{
"id": "066b36619b147e326d17053cccdef70f",
"choices": [
{
"finish_reason": "stop",
"index": 0,
"message": {
"content": "**9.9 更大。**\n\n比较方法很简单:把小数位数对齐:\n\n- 9.11 = 9.11\n- 9.90 = 9.9\n\n整数部分都是 9,所以比较小数部分:90 > 11,因此 **9.9 > 9.11**。\n\n---\n\n这是一个经典的小数比较问题,容易被混淆的原因在于:如果按**字符串**逐字符比较,\"9.9\"中的 '9' 会大于 \"9.11\"中的 '1',从而得出相反的结论。但在**数值**上,9.9 = 9.90 显然大于 9.11。",
"reasoning_content": "The user is asking which is larger: 9.11 or 9.9.\n\nLet me compare these two numbers:\n- 9.11\n- 9.9 = 9.90\n\nComparing 9.11 and 9.90:\n- The integer parts are both 9.\n- Compare the decimal parts: 11 vs 90 (treating as cents: 0.11 vs 0.90)\n- 90 > 11, so 9.9 > 9.11\n\nThis is actually a famous question that is sometimes used to trick people who might confuse string comparison with numerical comparison (since \"9.11\" > \"9.9\" as strings, but numerically 9.9 > 9.11).\n\nThe answer is straightforward: 9.9 is larger.",
"role": "assistant",
"name": "MiniMax AI",
"audio_content": ""
}
}
],
"created": 1780220769,
"model": "MiniMax-M3.1-Flash",
"object": "chat.completion",
"usage": {
"total_tokens": 473,
"total_characters": 0,
"prompt_tokens": 170,
"completion_tokens": 303,
"prompt_tokens_details": {
"cached_tokens": 157
}
},
"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核心能力:1M 超长上下文、多模态、思考深度可调。MiniMax-M3.1-Flash 新特性:- 支持图片、视频理解,可参考右方示例代码
- 支持通过
reasoning_effort调节思考深度,可取low、medium、high、xhigh、max,默认档位为max - 深度思考默认开启,无需额外配置;思考内容通过
reasoning_content字段单独返回
授权
HTTP: Bearer Auth
- Security Scheme Type: http
- HTTP Authorization Scheme: Bearer API_key,用于验证账户信息,可在 账户管理>接口密钥 中查看
请求头
请求体
application/json
请求准入服务层级。支持的取值为 standard 和 priority。省略时默认使用 standard。priority 的价格为 standard 的 1.5 倍,并会确保请求获得优先准入,使其排在其他请求之前处理,从而带来更快响应并减少失败。MiniMax-M3.1-Flash 不支持该字段。
可用选项:
standard, priority 响应
此页面对您有帮助吗?