MaaS_MiniMax_M3.1
模型概览
| 项 | 值 |
|---|---|
| 模型 ID(model) | MiniMax-M3.1-Flash |
| 上下文长度 | 1,000,000 tokens(输入与输出合计) |
| 最大输出 | Chat Completions 的 max_completion_tokens、Anthropic Messages 的 max_tokens:推荐 131072(128K),上限 524288(512K),最小 1。Responses 的 max_output_tokens 未给出同一数值 |
| 输入模态 | 文本、图片、视频 |
| 输出模态 | 文本;另返回思考内容,并支持工具调用 |
| 默认思考模式 | 开启且不可关闭。思考深度默认 max,可调 low、medium、high、xhigh、max |
| 显式提示缓存 | Anthropic cache_control 不支持。响应 usage 仍可能返回缓存计数;Responses 提供 prompt_cache_key |
请求协议
https
Header
| 参数名 | 类型 | 必填 | 描述 |
|---|---|---|---|
| Content-Type | string | 是 | application/json |
| Authorization | string | 是 | Bearer ${your_AK} |
OpenAI Chat Completions
请求 URL
POST https://genaiapi.cloudsway.net/v1/ai/{endpointPath}/chat/completions
请求 Body 参数
| 参数名 | 二级参数 | 三级参数 | 四级参数 | 类型 | 必填 | 描述 |
|---|---|---|---|---|---|---|
| model | - | - | - | string | 是 | 固定为 MaaS_Minimax_M3.1_flash_20261019(厂商原始 model:MiniMax-M3.1-Flash) |
| messages | - | - | - | array[object] | 是 | 对话历史。支持文本、图片、视频和工具调用。多轮工具调用须原样回带完整 assistant 消息(含 tool_calls)与 reasoning_content |
| role | - | - | string | 是 | system、user、assistant、tool |
|
| name | - | - | string | 否 | 发送者名称。同一角色有多个时用于区分 | |
| content | - | - | string 或 array | 否 | 文本,或内容块数组。schema 仅将 role 列为 required |
|
| type | - | string | 是 | 内容块为数组时必填:text、image_url、video_url |
||
| text | - | string | 否 | type=text 时的文本 |
||
| image_url | - | object | 否 | type=image_url。格式 JPEG、PNG、GIF、WEBP。单张图片 ≤ 10 MB,请求体 ≤ 64 MB |
||
| url | string | 是 | 图片 URL 或 Base64 data URL | |||
| detail | string | 否 | low、default、high,默认 default。单张粗略用量:low 通常几百、最高约 600 token;default 通常约 1k–3k、最高约 5k;high 通常数千、最高约 15k+。以响应 usage 为准 |
|||
| max_long_side_pixel | integer | 否 | 最长边像素,最小 1 | |||
| video_url | - | object | 否 | type=video_url。格式 MP4、AVI、MOV、MKV。URL/Base64 视频 ≤ 50 MB; |
||
| url | string | 是 | 视频 URL、Base64 data URL | |||
| detail | string | 否 | 抽帧分辨率:low、default、high,默认 default |
|||
| fps | number | 否 | 抽帧频率,默认 1,范围 [0.2, 5]。越高越敏感,token 更多、更慢 | |||
| max_long_side_pixel | integer | 否 | 单帧最长边像素,最小 1 | |||
| tool_calls | - | - | array[object] | 否 | assistant 消息中的工具调用。下一轮须原样回带 | |
| id | - | string | 是 | 工具调用 ID | ||
| type | - | string | 是 | 固定 function |
||
| function | - | object | 是 | 函数调用 | ||
| name | string | 是 | 函数名 | |||
| arguments | string | 是 | 函数入参,JSON 字符串 | |||
| tool_call_id | - | - | string | 否 | role=tool 时必填,取上一轮 tool_calls[].id。其他角色忽略 |
|
| thinking | - | - | - | object | 否 | 该模型强制思考。省略时等价于开启。disabled 返回 HTTP 400(错误码 2013) |
| type | - | - | string | 否 | 该模型只接受 adaptive,默认 adaptive。disabled 返回 HTTP 400 |
|
| reasoning_effort | - | - | - | string | 否 | 思考深度,仅该模型真正生效。low、medium、high、xhigh、max,省略默认 max。none 返回 HTTP 400。档位越高,思考 token 越多、延迟越高 |
| reasoning_split | - | - | - | boolean | 否 | true 时思考内容进入 reasoning_content;false 时以 think 标签留在 content。该模型不支持 false。该字段不开关思考。源文档未给出默认值 |
| stream | - | - | - | boolean | 否 | 是否流式,默认 false |
| stream_options | - | - | - | object | 否 | 流式选项 |
| include_usage | - | - | boolean | 否 | 是否在流中返回 token 用量,默认 false |
|
| max_completion_tokens | - | - | - | integer | 否 | 生成长度上限。该模型推荐 131072(128K),上限 524288(512K),最小 1。因长度停止时 finish_reason 为 length |
| temperature | - | - | - | number | 否 | 采样温度,范围 [0, 2],默认 1 |
| top_p | - | - | - | number | 否 | 核采样,范围 [0, 1]。该模型默认 0.95 |
| tools | - | - | - | array[object] | 否 | 工具定义,当前仅 function |
| type | - | - | string | 是 | 固定 function |
|
| function | - | - | object | 是 | 函数定义 | |
| name | - | string | 是 | 函数名称 | ||
| description | - | string | 否 | 函数描述 | ||
| parameters | - | object | 是 | 函数参数 JSON Schema | ||
| max_tokens | - | - | - | integer | 否 | 已弃用,请改用 max_completion_tokens。最小 1。思考 token 计入该上限,过小会导致 finish_reason=length 且 content 为空 |
请求示例
curl -X POST 'https://genaiapi.cloudsway.net/v1/ai/{endpointPath}/chat/completions' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ${your_AK}' \
-d '{
"model": "MaaS_Minimax_M3.1_flash_20261019",
"reasoning_effort": "max",
"thinking": {"type": "adaptive"},
"max_completion_tokens": 131072,
"messages": [
{"role": "user", "content": "9.11 和 9.9 哪个更大?"}
]
}'
响应示例
{
"id": "066b36619b147e326d17053cccdef70f",
"object": "chat.completion",
"created": 1780220769,
"model": "MaaS_Minimax_M3.1_flash_20261019",
"choices": [
{
"index": 0,
"finish_reason": "stop",
"message": {
"role": "assistant",
"content": "9.9 更大。9.9 = 9.90,大于 9.11。",
"reasoning_content": "比较 9.11 与 9.90,小数部分 90 > 11,所以 9.9 更大。"
}
}
],
"usage": {
"prompt_tokens": 170,
"completion_tokens": 303,
"total_tokens": 473,
"prompt_tokens_details": {"cached_tokens": 157}
},
"input_sensitive": false,
"output_sensitive": false,
"base_resp": {"status_code": 0, "status_msg": ""}
}
finish_reason 取值:stop、length、content_filter、tool_calls。简单轮次可能不返回 reasoning_content,读取前先判空。OpenAPI 的 Usage 仅声明 total_tokens;官方示例还返回 prompt_tokens、completion_tokens、prompt_tokens_details.cached_tokens。
流式请求示例
curl -X POST 'https://genaiapi.cloudsway.net/v1/ai/{endpointPath}/chat/completions' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ${your_AK}' \
-d '{
"model": "MaaS_Minimax_M3.1_flash_20261019",
"reasoning_effort": "max",
"stream": true,
"stream_options": {"include_usage": true},
"messages": [{"role": "user", "content": "9.11 和 9.9 哪个更大?"}]
}'
```plain text data: {"id":"066a2db7cb70134c45f5d6443d434c2c","object":"chat.completion.chunk","created":1780153015,"model":"MaaS_Minimax_M3.1_flash_20261019","choices":[{"index":0,"delta":{"role":"assistant","reasoning_content":"比较两个小数"},"finish_reason":null}]}
data: {"id":"066a2db7cb70134c45f5d6443d434c2c","object":"chat.completion.chunk","created":1780153015,"model":"MaaS_Minimax_M3.1_flash_20261019","choices":[{"index":0,"delta":{"role":"assistant","content":"9.9 更大。"},"finish_reason":"stop"}]}
流式 chunk 的 `finish_reason` 在源站枚举中为 `stop`、`length`,未结束时为 null。
### SDK 调用方式
```python
from openai import OpenAI
client = OpenAI(
base_url="https://genaiapi.cloudsway.net/v1/ai/{endpointPath}",
api_key="${your_AK}",
)
response = client.chat.completions.create(
model="MaaS_Minimax_M3.1_flash_20261019",
reasoning_effort="max",
messages=[{"role": "user", "content": "9.11 和 9.9 哪个更大?"}],
extra_body={"thinking": {"type": "adaptive"}},
)
print(response.choices[0].message.reasoning_content)
print(response.choices[0].message.content)
OpenAI Responses
请求 URL
POST https://genaiapi.cloudsway.net/v1/ai/{endpoint}/responses
请求 Body 参数
| 参数名 | 二级参数 | 三级参数 | 四级参数 | 类型 | 必填 | 描述 |
|---|---|---|---|---|---|---|
| model | - | - | - | string | 是 | 固定为 MaaS_Minimax_M3.1_flash_20261019(厂商原始 model:MiniMax-M3.1-Flash) |
| input | - | - | - | string 或 array | 是 | 简单文本,或对话历史数组 |
| type | - | - | string | 否 | 数组项类型:message(默认)、function_call、function_call_output、reasoning |
|
| role | - | - | string | 否 | type=message 时:user、assistant、system、developer、tool |
|
| content | - | - | string 或 array | 否 | type=message 时的文本或多模态内容块 |
|
| type | - | string | 是 | input_text、output_text、input_image、input_video |
||
| text | - | string | 否 | input_text / output_text 的文本 |
||
| image_url | - | string 或 object | 否 | input_image。格式 JPEG、PNG、GIF、WEBP |
||
| url | string | 是 | 对象形式时必填。图片 URL 或 Base64 | |||
| detail | string | 否 | low、default、high,默认 default |
|||
| video_url | - | string 或 object | 否 | input_video。格式 MP4、AVI、MOV、MKV。大文件走 File API |
||
| url | string | 是 | 对象形式时必填。视频 URL 或 Base64 | |||
| fps | number | 否 | 抽帧频率,默认 1,范围 [0.2, 5] | |||
| detail | string | 否 | low、default、high,默认 default |
|||
| max_long_side_pixel | integer | 否 | 视频帧最长边像素。源文档未给最小/最大值 | |||
| call_id | - | - | string | 否 | function_call 或 function_call_output 的工具调用 ID |
|
| name | - | - | string | 否 | function_call 的函数名 |
|
| arguments | - | - | string | 否 | function_call 的参数,JSON 字符串 |
|
| output | - | - | string 或 array | 否 | function_call_output 的工具返回 |
|
| summary | - | - | array | 否 | type=reasoning 时的推理片段 |
|
| type | - | string | 否 | summary_text |
||
| text | - | string | 否 | 推理文本 | ||
| instructions | - | - | - | string | 否 | 系统指令 |
| max_output_tokens | - | - | - | integer | 否 | 最大输出 token。思考 token 计入该上限;过小会使 status=incomplete,且 output 中没有 message。数值上下限源文档未说明 |
| temperature | - | - | - | number | 否 | 采样温度。描述为范围 (0, 1],默认 1;schema 的 minimum 为 0、maximum 为 1。与 Chat Completions 的 [0, 2] 不同 |
| top_p | - | - | - | number | 否 | 核采样。描述为范围 (0, 1],默认 0.95;schema 的 minimum 为 0、maximum 为 1 |
| stream | - | - | - | boolean | 否 | true 时走 SSE,默认 false |
| tools | - | - | - | array[object] | 否 | 工具列表 |
| type | - | - | string | 是 | 固定 function |
|
| name | - | - | string | 是 | 函数名 | |
| description | - | - | string | 否 | 函数描述 | |
| parameters | - | - | object | 否 | 参数 JSON Schema | |
| tool_choice | - | - | - | string | 否 | 仅 auto,由模型决定是否调用工具 |
| metadata | - | - | - | object | 否 | 请求元数据,键和值均为字符串 |
| prompt_cache_key | - | - | - | string | 否 | Prompt cache 路由标识 |
| text | - | - | - | object | 否 | 输出格式控制 |
| format | - | - | object | 否 | 格式对象 | |
| type | - | string | 否 | 仅 text,默认 text |
||
| reasoning | - | - | - | object | 否 | 该模型即使省略 reasoning 也始终推理 |
| effort | - | - | string | 否 | 模型专条接受 low、medium、high、xhigh、max,省略默认 max。none 返回 HTTP 400。schema 枚举另含 minimal,源文档未说明该模型是否接受 |
请求示例
curl -X POST 'https://genaiapi.cloudsway.net/v1/ai/{endpoint}/responses' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ${your_AK}' \
-d '{
"model": "MaaS_Minimax_M3.1_flash_20261019",
"reasoning": {"effort": "max"},
"input": "Which is bigger, 9.11 or 9.9?"
}'
响应示例
{
"id": "07229fa48d63ee86b664bb1c3a2257b7",
"object": "response",
"created_at": 1792240804,
"model": "MaaS_Minimax_M3.1_flash_20261019",
"status": "completed",
"output": [
{
"id": "07229fa48d63ee86b664bb1c3a2257b7_rs",
"type": "reasoning",
"status": "completed",
"summary": [],
"content": [{"type": "reasoning_text", "text": "9.9 = 9.90,大于 9.11。"}]
},
{
"id": "07229fa48d63ee86b664bb1c3a2257b7_msg",
"type": "message",
"status": "completed",
"role": "assistant",
"content": [{"type": "output_text", "text": "9.9 is bigger than 9.11.", "annotations": []}]
}
],
"output_text": "9.9 is bigger than 9.11.",
"usage": {
"input_tokens": 218,
"output_tokens": 68,
"total_tokens": 286,
"input_tokens_details": {"cached_tokens": 189},
"output_tokens_details": {"reasoning_tokens": 36}
},
"error": null,
"incomplete_details": null
}
status 取值:completed、incomplete、failed。incomplete_details.reason 取值:max_output_tokens、content_filter。output 还可出现 type=function_call(含 call_id、name、arguments)。
流式请求示例
curl -X POST 'https://genaiapi.cloudsway.net/v1/ai/{endpoint}/responses' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ${your_AK}' \
-d '{
"model": "MaaS_Minimax_M3.1_flash_20261019",
"reasoning": {"effort": "max"},
"stream": true,
"input": "Which is bigger, 9.11 or 9.9?"
}'
源站流式事件类型依次包括:response.created、response.in_progress、response.output_item.added、response.content_part.added、response.reasoning_text.delta、response.reasoning_text.done、response.content_part.done、response.output_item.done、response.output_text.delta、response.output_text.done、response.completed。
data: {"type":"response.created","sequence_number":0,"response":{"id":"07229fa484712ce19b28c3e706b4f60c","object":"response","model":"MaaS_Minimax_M3.1_flash_20261019","status":"in_progress","output":[]}}
data: {"type":"response.reasoning_text.delta","sequence_number":5,"delta":"9.9 = 9.90"}
data: {"type":"response.output_text.delta","sequence_number":12,"delta":"9.9 is bigger."}
data: {"type":"response.completed","sequence_number":20,"response":{"id":"07229fa484712ce19b28c3e706b4f60c","object":"response","model":"MaaS_Minimax_M3.1_flash_20261019","status":"completed"}}
SDK 调用方式
from openai import OpenAI
client = OpenAI(
base_url="https://genaiapi.cloudsway.net/v1/ai/{endpoint}",
api_key="${your_AK}",
)
response = client.responses.create(
model="MaaS_Minimax_M3.1_flash_20261019",
reasoning={"effort": "max"},
input="Which is bigger, 9.11 or 9.9?",
)
print(response.output_text)
Anthropic Messages
请求 URL
POST https://genaiapi.cloudsway.net/{endpoint}/v1/messages
请求 Body 参数
| 参数名 | 二级参数 | 三级参数 | 四级参数 | 类型 | 必填 | 描述 |
|---|---|---|---|---|---|---|
| model | - | - | - | string | 是 | 固定为 MaaS_Minimax_M3.1_flash_20261019(厂商原始 model:MiniMax-M3.1-Flash) |
| max_tokens | - | - | - | integer | 否 | OpenAPI 未列入 required,示例均会传入。该模型推荐 131072(128K),上限 524288(512K),最小 1。思考 token 计入该上限,过小会使 stop_reason=max_tokens 且没有文本输出 |
| messages | - | - | - | array[object] | 是 | 对话历史。该模型使用交替的 user / assistant。后续轮次须原样回带 thinking 块(含 signature) |
| role | - | - | string | 是 | 该模型使用 user、assistant。schema 还列出 user_system、group、sample_message_user、sample_message_ai,源文档未说明该模型是否可用 |
|
| content | - | - | string 或 array | 是 | 纯文本,或内容块数组 | |
| type | - | string | 是 | text、image、video、tool_use、tool_result、thinking、mid_conv_system。thinking 仅用于回传上一轮 assistant 思考 |
||
| text | - | string | 否 | type=text 的文本 |
||
| source | - | object | 否 | type=image 或 type=video 的媒体来源 |
||
| type | string | 是 | base64 或 url |
|||
| media_type | string | 否 | base64 时必填,如 image/png、video/mp4。图片:JPEG/PNG/GIF/WEBP。视频:MP4、AVI、MOV、MKV |
|||
| data | string | 否 | Base64 媒体字节 | |||
| url | string | 否 | 公网 URL。URL/Base64:视频 ≤ 50 MB,图片 ≤ 10 MB,请求体 ≤ 64 MB; | |||
| detail | string | 否 | low、default、high,默认 default。图片粗略用量同 Chat Completions 的 detail 表 |
|||
| fps | number | 否 | 视频抽帧,默认 1,范围 [0.2, 5] | |||
| max_long_side_pixel | integer | 否 | 图片或视频帧最长边像素,最小 1 | |||
| id | - | string | 否 | 回传 tool_use 时的工具调用 ID |
||
| name | - | string | 否 | 回传 tool_use 时的工具名 |
||
| input | - | object | 否 | 回传 tool_use 时的工具入参 |
||
| tool_use_id | - | string | 否 | tool_result 对应的 tool_use ID |
||
| content | - | string 或 array | 否 | tool_result 的执行结果,字符串或 text/image 内容块数组 |
||
| thinking | - | string | 否 | 回传的思考文本 | ||
| signature | - | string | 否 | 思考签名,后续轮次须原样回传 | ||
| system | - | - | - | string 或 array | 否 | 系统提示。数组项为 type=text 加 text。cache_control 该模型不支持 |
| stream | - | - | - | boolean | 否 | 是否流式,默认 false |
| temperature | - | - | - | number | 否 | 范围 [0, 2],默认 1。兼容说明推荐值 1 |
| top_p | - | - | - | number | 否 | 范围 [0, 1]。该模型默认 0.95 |
| tools | - | - | - | array[object] | 否 | 工具定义 |
| name | - | - | string | 是 | 工具名 | |
| description | - | - | string | 否 | 工具描述 | |
| input_schema | - | - | object | 是 | 入参 JSON Schema | |
| tool_choice | - | - | - | object | 否 | 工具选择策略,仅支持 auto |
| type | - | - | string | 是 | 固定 auto |
|
| thinking | - | - | - | object | 否 | 该模型始终思考。若传 type,只能是 adaptive;disabled 返回 HTTP 400 |
| type | - | - | string | 否 | 该模型只接受 adaptive。disabled 返回 HTTP 400 |
|
| output_config | - | - | - | object | 否 | 输出配置。用 effort 调节该模型的思考深度 |
| effort | - | - | string | 否 | low、medium、high、xhigh、max,省略默认 max。none 返回 HTTP 400 |
|
| metadata | - | - | - | object | 否 | 请求元数据 |
| user_id | - | - | string | 否 | 终端用户 ID,用于聚合、限流和计费分析 |
请求示例
curl -X POST 'https://genaiapi.cloudsway.net/{endpoint}/v1/messages' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ${your_AK}' \
-d '{
"model": "MaaS_Minimax_M3.1_flash_20261019",
"max_tokens": 4096,
"thinking": {"type": "adaptive"},
"output_config": {"effort": "max"},
"messages": [
{"role": "user", "content": "Which is bigger, 9.11 or 9.9?"}
]
}'
响应示例
{
"id": "066b367ba949a58a9d6829b4bf8cbcd4",
"type": "message",
"role": "assistant",
"model": "MaaS_Minimax_M3.1_flash_20261019",
"content": [
{
"type": "thinking",
"thinking": "9.9 = 9.90,大于 9.11。",
"signature": "6d0315c818f9664ff185dabaa22cd89f2bf28a3a52122095bce23d905471ec5f"
},
{
"type": "text",
"text": "9.9 is bigger than 9.11."
}
],
"stop_reason": "end_turn",
"usage": {
"input_tokens": 13,
"output_tokens": 149,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 159
}
}
stop_reason 取值:end_turn、max_tokens、tool_use。调用工具时内容块为 tool_use(id、name、input)。响应不会包含 image、video、tool_result、mid_conv_system 块。
流式请求示例
curl -X POST 'https://genaiapi.cloudsway.net/{endpoint}/v1/messages' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer ${your_AK}' \
-d '{
"model": "MaaS_Minimax_M3.1_flash_20261019",
"max_tokens": 4096,
"output_config": {"effort": "max"},
"stream": true,
"messages": [{"role": "user", "content": "Which is bigger, 9.11 or 9.9?"}]
}'
事件类型:message_start、ping、content_block_start、content_block_delta、content_block_stop、message_delta、message_stop。delta 类型包括 thinking_delta、text_delta、signature_delta。流式出错时为 event: error。
event: message_start
data: {"type":"message_start","message":{"id":"066b367ba949a58a9d6829b4bf8cbcd4","type":"message","role":"assistant","model":"MaaS_Minimax_M3.1_flash_20261019","content":[],"stop_reason":null}}
event: content_block_delta
data: {"type":"content_block_delta","index":0,"delta":{"type":"thinking_delta","thinking":"9.9 = 9.90"}}
event: content_block_delta
data: {"type":"content_block_delta","index":1,"delta":{"type":"text_delta","text":"9.9 is bigger."}}
event: message_delta
data: {"type":"message_delta","delta":{"stop_reason":"end_turn"},"usage":{"output_tokens":149}}
event: message_stop
data: {"type":"message_stop"}
SDK 调用方式
import anthropic
client = anthropic.Anthropic(
base_url="https://genaiapi.cloudsway.net/{endpoint}/v1",
api_key="${your_AK}",
)
message = client.messages.create(
model="MaaS_Minimax_M3.1_flash_20261019",
max_tokens=4096,
output_config={"effort": "max"},
messages=[{"role": "user", "content": "Which is bigger, 9.11 or 9.9?"}],
)
for block in message.content:
if block.type == "thinking":
print(block.thinking)
elif block.type == "text":
print(block.text)