Skip to content

MaaS_MiniMax_M2.5/2.7

Model Name MiniMax-M2.5/M2.7

Context Window 204,800

Model introduction, top performance and ultimate cost-effectiveness, easily handle complex tasks (output speed is about 60 TPS).

Model Name MiniMax-M2.5-highspeed/MiniMax-M2.7-highspeed

Context Window 204,800

Model Introduction M2.5 Extreme Edition: The effect remains unchanged, but it is faster and more agile (output speed is approximately 100 TPS)

Request Protocol

Https

Request Header

Parameter Name Value
Authorization Bearer
Content-Type multipart/form-data

Parameter

Core Parameters

Attribute Name Type Required/Optional Description
model string Required Model Name.
messages array Required Conversation message list, containing conversation history. Supports basic roles (system, user, assistant) and advanced roles (user_system, group, sample_message_user, sample_message_ai).
temperature number Optional Temperature coefficient, controls output randomness, with a value range of (0, 1]. The higher the value, the more random the output; the lower the value, the more deterministic the output, with a default value of 1.0.
top_p number Optional Nucleus sampling strategy, which controls output diversity, with a value range of (0, 1]. The smaller the value, the more conservative the output.
max_tokens / max_completion_tokens integer Optional The maximum number of tokens for generated content, with an upper limit of 2048. It is recommended to set this value reasonably to avoid output truncation.
stream boolean Optional Whether to use streaming, default is false. Setting it to true will return the response in batches.

Advanced Function Parameters

Attribute Name Type Required/Optional Description
stop string/array Optional Up to 4 stop sequences, upon encountering which the API will stop generating tokens.
n integer Optional Number of chat completion options generated for each input message. MiniMax currently only supports n = 1.
frequency_penalty number Optional Frequency Penalty, with a value range from -2.0 to 2.0. A positive value penalizes tokens that have already appeared frequently, reducing the probability of the model repeating statements.
presence_penalty number Optional There is a penalty, with a value range from -2.0 to 2.0. Positive values penalize tokens that have already appeared, encouraging the model to explore new topics.
response_format object Optional Specify the model output format. Setting {"type": "json_object"} enables JSON mode.
seed integer Optional Seed for deterministic sampling. Under the same seed and parameters, the system will strive to return the same results.
tool_choice string/object Optional Controls whether the model calls tools. Optional values: "none" (no call), "auto" (automatic selection), "required" (must call), or specify a specific function.
tools array Optional The list of tools that the model can call, currently only supports function type.
mask_sensitive_info boolean Optional Whether to desensitize sensitive information in the output, default is true.
user string Optional Unique identifier of the end user, used for monitoring and abuse detection.

Special role parameters (available in the messages array)

Attribute Name Type Required/Optional Description
role string Required Role types. Basic roles: system (sets the model role), user (user input), assistant (model response). Advanced roles: user_system (sets the user persona), group (conversation grouping), sample_message_user (example user input), sample_message_ai (example model output).
name string Optional The name identifier of the message sender, used to distinguish different participants in the conversation.
content string Condition Required The text content of the message. It is a required field for regular conversation messages and for sample conversations (sample_message_user/sample_message_ai).

/chat/completions Request Example

curl --location --request POST 'https://genaiapi.cloudsway.net/v1/ai/{endpointPath}/chat/completions' \
--header 'Authorization: Bearer {YOUR AK}' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model": "MiniMax-M2.5",
    "reasoning_split": true,
    "messages": [
      {
        "role": "user",
        "content": [
          {
            "type": "text",
            "text": "what is elephent?"
          }
        ]
      }
    ]
  }'

Return Example

{
    "id": "chatcmpl-wY8FIAgqKvdcHBAZsSL3n2H1",
    "choices": [
        {
            "index": 0,
            "message": {
                "role": "assistant",
                "content": "Elephants are mammals belonging to the family Elephantidae. They are the largest land animals, mainly divided into two genera: Loxodonta (African elephants) and Elephas (Asian elephants). Elephants are known for their enormous size, long trunk, and large ears. They live in a variety of habitats such as grasslands, forests, and swamps, and are herbivores, feeding on grasses, leaves, bark, fruits, and more. Elephants are highly social animals, typically living in groups, and have complex social structures and communication methods.
",
                "reasoning_details": [
                    {
                        "type": "reasoning.text",
                        "text": "<answer>\nElephants are mammals belonging to the family Elephantidae. They are the largest land animals, mainly divided into two genera: Loxodonta (African elephants) and Elephas (Asian elephants). Elephants are known for their enormous size, long trunk, and large ears. They live in a variety of habitats such as grasslands, forests, and swamps, and are herbivores, feeding on grasses, leaves, bark, fruits, and more. Elephants are highly social animals, typically living in groups, and have complex social structures and communication methods\n</answer>\n",
                        "signature": null
                    }
                ]
            },
            "finish_reason": "stop",
            "native_finish_reason": "stop"
        }
    ],
    "created": 1779174874,
    "model": "MaaS_Minimax_M2.7_20260318",
    "object": "chat.completion",
    "usage": {
        "prompt_tokens": 46,
        "completion_tokens": 203,
        "total_tokens": 249,
        "completion_tokens_details": {
            "accepted_prediction_tokens": 0,
            "audio_tokens": 0,
            "image_tokens": 0,
            "reasoning_tokens": 172,
            "rejected_prediction_tokens": 0
        },
        "prompt_tokens_details": {
            "audio_tokens": 0,
            "cached_tokens": 35,
            "image_tokens": 0
        }
    }
}

Text Conversation (OpenAI API Compatible)

Request Example

curl --request POST \
  --url https://{新平台域名}/v1/chat/completions \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "model": "MaaS_Minimax_M2.7_20260318",
  "messages": [
    {
      "role": "system",
      "name": "MiniMax AI"
    },
    {
      "role": "user",
      "content": "hello",
      "name": "user"
    }
  ]
}
'

Return Example

{
    "id": "chatcmpl-Sfq4bWiUnaarkHytvNwBcrRw",
    "choices": [
        {
            "index": 0,
            "message": {
                "role": "assistant",
                "content": "Hello! Is there anything I can help you with?"
            },
            "finish_reason": "stop",
            "native_finish_reason": "stop"
        }
    ],
    "created": 1779175080,
    "model": "MaaS_Minimax_M2.7_20260318",
    "object": "chat.completion",
    "usage": {
        "prompt_tokens": 43,
        "completion_tokens": 29,
        "total_tokens": 72,
        "completion_tokens_details": {
            "accepted_prediction_tokens": 0,
            "audio_tokens": 0,
            "image_tokens": 0,
            "reasoning_tokens": 33,
            "rejected_prediction_tokens": 0
        },
        "prompt_tokens_details": {
            "audio_tokens": 0,
            "cached_tokens": 35,
            "image_tokens": 0
        }
    }
}