Skip to content

MiniMax โ€‹

Updated

Endpoint: https://mmu.vod-qcloud.com/v1Authentication: VOD ApiToken / Bearer

MiniMax is a text generation / chat model called through an OpenAI-compatible API, with JSON and SSE streaming responses. Versions m2.7 and m2.5 are available; both support Chat Completions, while the Messages protocol is supported only by m2.7.

Basic Information โ€‹

ItemValue
Call endpointhttps://mmu.vod-qcloud.com
AuthenticationVOD Application-issued ApiToken / Bearer
OutputText / Structured response
Response modeJSON / SSE

Supported Protocols โ€‹

SpecPathTarget
Chat CompletionsPOST /v1/chat/completionsAll models below
MessagesPOST /v1/messagesminimax-m2.7

The model IDs below use the corresponding spec. Authentication and common fields follow API Reference.

Sampling Options โ€‹

Commonly applies to all models listed in this document.

ParameterSetting
temperatureConfigurable
top_pConfigurable

temperature specifies the sampling temperature, and top_p specifies the cumulative probability range. Adjust centered on one method.

Per-Version Reasoning Settings โ€‹

Model IDConfigurationDisable
minimax-m2.7thinking_enabledCannot be disabled
minimax-m2.5thinking_enabledCannot be disabled

Based on Chat Completions. Reasoning content is read from reasoning_content, and the final answer from content. Do not pass a disable option to versions that cannot be disabled.

Request Parameters โ€‹

ParameterRequiredTypeDescription
modelRequiredStringA model ID from the per-version options table
messagesRequiredArrayConversation input for Chat Completions / Messages
max_tokensOptionalIntegerGeneration limit for Chat Completions / Messages. Required in Messages
streamOptionalBooleantrue: SSE / false: JSON

Request Examples โ€‹

Chat Completions โ€‹

json
{
  "model": "minimax-m2.7",
  "messages": [
    {
      "role": "user",
      "content": "Reply with exactly OK and nothing else."
    }
  ],
  "max_tokens": 2048,
  "stream": false
}

Response โ€‹

json
{
  "id": "01a0de41-429b-777d-aaee-51066e76e8e6",
  "object": "chat.completion",
  "model": "minimax-m2.7",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "OK",
        "reasoning_content": "The user asks: \"Reply with exactly OK and nothing else.\" That is a direct instruction. There's no policy violation. So the assistant should respond with exactly \"OK\". No extra characters, no punctuation beyond exactly \"OK\"? The user said \"Reply with exactly OK and nothing else.\" That likely means the assistant must output \"OK\" exactly, no extra whitespace, no newline? The user wants exactly \"OK\". So output \"OK\". Must ensure no extra spaces, no line breaks. It is safe. So final answer is just"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 51,
    "prompt_tokens_details": {
      "audio_tokens": 0,
      "cached_tokens": 14
    },
    "prompt_cached_tokens_details": {
      "audio_tokens": 0
    },
    "completion_tokens": 114,
    "completion_tokens_details": {
      "accepted_prediction_tokens": 0,
      "audio_tokens": 0,
      "reasoning_tokens": 0,
      "rejected_prediction_tokens": 0
    },
    "total_tokens": 165
  }
}

Messages โ€‹

json
{
  "model": "minimax-m2.7",
  "messages": [
    {
      "role": "user",
      "content": "Reply with exactly OK and nothing else."
    }
  ],
  "max_tokens": 512,
  "stream": false
}

Response โ€‹

json
{
  "id": "01a0de34-dae5-7c93-816b-35ec7b860908",
  "model": "minimax-m2.7",
  "type": "message",
  "role": "assistant",
  "content": [
    {
      "type": "thinking",
      "thinking": "The user says: \"Reply with exactly OK and nothing else.\" They want the assistant to reply with exactly \"OK\". This is a direct request. There's no policy conflict. The user wants a simple response. The instruction is to reply with exactly OK and nothing else.\n\nWe must comply. So output \"OK\".",
      "signature": "8754e352280f346195f01e478898770cf8c079fad609a972559acf7eb41e66b6"
    },
    {
      "type": "text",
      "text": "OK"
    }
  ],
  "stop_reason": "end_turn",
  "usage": {
    "input_tokens": 49,
    "output_tokens": 68
  }
}

Special Settings โ€‹

Used for text conversation and code tasks. Reasoning settings are passed through the thinking object of Messages. Under the Messages spec, text blocks and reasoning blocks are read separately. Reasoning tokens also consume the generation limit, so if the final answer is empty, check the finish reason and token usage.

Messages Reasoning Request โ€‹

minimax-m2.7 โ€‹

json
{
  "model": "minimax-m2.7",
  "messages": [
    {
      "role": "user",
      "content": "Find the smallest positive integer n for which n squared is divisible by 72. Explain briefly."
    }
  ],
  "max_tokens": 2048,
  "stream": false,
  "thinking": {
    "type": "adaptive"
  }
}

In the content of the response, distinguish type=thinking from type=text. The signature of a reasoning block is preserved as-is in follow-up conversations.

Built with VitePress ยท Deployed on Tencent EdgeOne Pages