跳到内容

MiniMax ​

更新时间

Endpoint: https://mmu.vod-qcloud.com/v1认证: VOD ApiToken / Bearer

MiniMax 是文本生成 / 对话模型,通过兼容 OpenAI 的接口调用,支持 JSON 与 SSE 流式响应。提供 m2.7、m2.5 版本,均支持 Chat Completions,Messages 协议仅 m2.7 支持。

基本信息 ​

项目取值
调用地址https://mmu.vod-qcloud.com
认证VOD 应用签发的 ApiToken / Bearer
输出文本 / 结构化响应
响应方式JSON / SSE

支持的协议 ​

规格路径对象
Chat CompletionsPOST /v1/chat/completions下方所有模型
MessagesPOST /v1/messagesminimax-m2.7

下方模型 ID 使用对应规格。认证与公共字段遵循 API Reference。

采样选项 ​

对本文档中列出的所有模型通用。

参数设置
temperature可设置
top_p可设置

temperature 指定采样温度,top_p 指定累积概率范围。以一种方式为主进行调整。

各版本推理设置 ​

模型 ID设置方式停用
minimax-m2.7thinking_enabled无法停用
minimax-m2.5thinking_enabled无法停用

以 Chat Completions 为基准。推理内容从 reasoning_content 读取,最终答案从 content 读取。对无法停用的版本不传递停用选项。

请求参数 ​

参数必填类型说明
model必填String各版本选项表中的模型 ID
messages必填ArrayChat Completions / Messages 的对话输入
max_tokens可选IntegerChat Completions / Messages 的生成上限。在 Messages 中为必填
stream可选Booleantrue:SSE / false:JSON

请求示例 ​

Chat Completions ​

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

响应 ​

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
}

响应 ​

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
  }
}

特殊设置 ​

用于文本对话与代码任务。推理设置通过 Messages 的 thinking 对象传递。在 Messages 规格中,文本块与推理块分开读取。推理令牌同样占用生成上限,因此若最终答案为空,请检查结束原因与令牌用量。

Messages 推理请求 ​

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"
  }
}

在响应的 content 中区分 type=thinking 与 type=text。推理块的签名在后续对话中保持原样。

基于 VitePress 构建 · 部署于腾讯云 EdgeOne Pages