HAI Gateway Docs

MiniMax

MiniMax Anthropic Messages

Call MiniMax M-series models via the Anthropic Messages compatible endpoint, supporting streaming, thinking, and tool calling.

POSTv1/messages

Authorizations

x-api-keystringheaderrequired

sk-pat-YourAccessToken

anthropic-versionstringheaderrequired

API version, currently 2023-06-01

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 Anthropic Messages API format — existing Claude SDK code works unchanged; just set model to MiniMax-M2.5.

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 thinking in multi-turn context: When building conversation history, only pass back the previous turn's text block — do not include thinking blocks in messages, otherwise a parameter error will be returned.
  • system goes in the top-level field: The Anthropic endpoint follows the official user / assistant conversation structure, with system messages passed via the top-level system field.
cURL
cURL:Streaming
curl https://api.hai.network/compatible-preview/anthropic/v1/messages \
  -H "Content-Type: application/json" \
  -H "x-api-key: sk-pat-YOUR_ACCESS_TOKEN" \
  -H "anthropic-version: 2023-06-01" \
  -d '{
    "model": "MiniMax-M2.5",
    "stream": true,
    "max_tokens": 1024,
    "messages": [
      {
        "role": "user",
        "content": "Summarize three advantages of MoE over dense models"
      }
    ]
  }'