HAI Gateway Docs

MiniMax

MiniMax Chat Completions

Call MiniMax M-series models via the OpenAI-compatible endpoint, supporting streaming, long context, tool calling, and thinking.

POSTv1/chat/completions

Authorizations

Authorizationstringheaderrequired

OpenAI compatible endpoint: Bearer sk-pat-YourAccessToken

Use your HAI Gateway personal access token (starting with sk-pat-). No separate MiniMax API key is required.

Base URL

Body Parameters

The request body follows the OpenAI Chat Completions API format. For detailed parameter descriptions, refer to the MiniMax official documentation.

Supported Models

ModelContextRecommended for
MiniMax-M2.51M tokensCurrent flagship — strong reasoning + tool calling + long context
MiniMax Notes
  • Only Chat Completion endpoints are supported: MiniMax does not support the OpenAI Responses (/v1/responses) endpoint. Please use /v1/chat/completions or Anthropic /v1/messages.
  • Thinking field location: On the OpenAI endpoint, the reasoning chain is in choices[].message.reasoning_content; on the Anthropic endpoint, it appears as a thinking block in the content array.
  • Model name is case-sensitive: Use exactly MiniMax-M2.5 — both Ms capitalized — any other casing is rejected.
  • Do not pass reasoning in multi-turn context: When building conversation history, only pass back the previous turn's content (OpenAI) or text block (Anthropic) — do not include reasoning_content / thinking blocks in messages, otherwise a parameter error will be returned.
  • developer role not supported: The OpenAI compatible endpoint only accepts system / user / assistant roles.
cURL
cURL:Default
curl https://api.hai.network/compatible-preview/openai/v1/chat/completions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-pat-YOUR_ACCESS_TOKEN" \
  -d '{
    "model": "MiniMax-M2.5",
    "messages": [
      {
        "role": "user",
        "content": "Hello, introduce MiniMax in one sentence"
      }
    ]
  }'
200
200:Default
{
  "id": "chatcmpl-...",
  "object": "chat.completion",
  "model": "MiniMax-M2.5",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "I am MiniMax, a multimodal large model developed by MiniMax AI."
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 18,
    "completion_tokens": 24,
    "total_tokens": 42
  }
}