4Z API

文本合成

接口: POST https://4zapi.com/v1/messages

MiniMax 文本对话接口(Apifox 导出路径为 /v1/messages,非 /minimax/v1/ 前缀)。

https://platform.minimaxi.com/docs/api-reference/text-post

请求体 (application/json)

  • messages (array<object>, 必填): 对话消息列表
  • model (string, 必填): 模型名称 / 型号 ID
  • max_completion_tokens (integer): 最大补全 token 数
  • stream (boolean): 是否流式返回
  • stream_options (object): 流式选项
  • temperature (number): 采样温度;越高越随机
  • top_p (number): 核采样概率阈值

请求示例

{
  "max_completion_tokens": 2048,
  "messages": [
    {
      "content": "你是一个专业、友好的AI助手。",
      "name": "AI助手",
      "role": "system",
      "x-i18n": {
        "en-US": {
          "name": "AI assistant"
        }
      }
    },
    {
      "content": "帮我写一首关于秋天的诗。",
      "name": "张三",
      "role": "user",
      "x-i18n": {
        "en-US": {
          "name": "John Doe"
        }
      }
    }
  ],
  "model": "MiniMax-M2.1",
  "stream": true,
  "stream_options": {
    "include_usage": true
  },
  "temperature": 0.9,
  "top_p": 0.95
}