MiniMax
MiniMax Chat Completions
Call MiniMax M-series models via the OpenAI-compatible endpoint, supporting streaming, long context, tool calling, and thinking.
POST
v1/chat/completionsAuthorizations
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
| Model | Context | Recommended for |
|---|---|---|
MiniMax-M2.5 | 1M tokens | Current 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/completionsor 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 athinkingblock in thecontentarray. - Model name is case-sensitive: Use exactly
MiniMax-M2.5— bothMs 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) ortextblock (Anthropic) — do not includereasoning_content/thinkingblocks inmessages, otherwise a parameter error will be returned. - developer role not supported: The OpenAI compatible endpoint only accepts
system/user/assistantroles.
cURL
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
{
"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
}
}