4Z API

text synthesis

Endpoint: POST https://4zapi.com/v1/messages

MiniMax text chat endpoint (Apifox export path is /v1/messages, not /minimax/v1/ prefix).

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

Request body (application/json)

  • messages (array<object>, required): List of conversation messages
  • model (string, required): Model name / model ID
  • max_completion_tokens (integer): Maximum number of completion tokens
  • stream (boolean): Whether to stream the response
  • stream_options (object): Streaming options
  • temperature (number): Sampling temperature; higher is more random
  • top_p (number): Nucleus sampling probability threshold

Request example

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