MiniMax-M3 - OpenAI-Compatible API
- Use the OpenAI Chat Completions protocol to call the MiniMax-M3 model
- Multi-turn conversation: Supports single-turn or multi-turn contextual dialogue
- System prompts: Customize AI role and behavior via
role=systemmessages - Multimodal input:
contentsupports mixed text + image / video - Thinking mode: Controlled via
thinking.type; thinking content is returned viareasoning_content - Streaming output: Supports SSE streaming responses
- Tool calling: Supports Function Calling
Authorization
##All APIs require Bearer Token authentication## **Get API Key:** Visit [API Key Management Page](https://starmagic.ai/app/api-keys) to get your API Key **Add to request header:** ``` Authorization: Bearer YOUR_API_KEY ```
Authorization: Bearer YOUR_API_KEYRequest body
application/jsonChat model name
"MiniMax-M3"List of conversation messages, supports multi-turn dialogue Messages with different roles have different field structures; select the corresponding role to view
[
null
]Controls deep thinking **Notes**: - **Defaults to `adaptive`**: The model adaptively decides whether to engage in deep thinking based on problem difficulty - By default, thinking content is inlined in the response `content` (wrapped in `<think>...</think>` tags); to separate it into a dedicated field, use `reasoning_split`
{
"type": "adaptive"
}Whether to split thinking content into a separate field - `false` (default): Thinking content is inlined in `content`, wrapped in `<think>...</think>` tags - `true`: Thinking content is split into `choices[].message.reasoning_content` and `reasoning_details`
trueSampling temperature, controls output randomness **Notes**: - Lower values (e.g. 0.2): More deterministic, focused output - Higher values (e.g. 1.5): More random, creative output - Range: `[0, 2]`, default 1
1Nucleus Sampling parameter **Notes**: - Controls sampling from tokens with cumulative probability - e.g. 0.95 means selecting from tokens reaching 95% cumulative probability - Range: `[0, 1]`, MiniMax-M3 default 0.95 **Recommendation**: Do not adjust temperature and top_p simultaneously
0.95Upper limit for generated content length (in tokens) **Notes**: - MiniMax-M3 recommended **131,072** (128K), maximum **524,288** (512K) - Tokens generated by thinking also count toward this limit - If generation is interrupted due to `length`, try increasing this value
131072Whether to return the response in streaming mode - `true`: Streaming response, returns content in real-time chunks via SSE (Server-Sent Events) - `false`: Wait for complete response before returning (default)
falseStreaming response options Only effective when `stream=true`
{
"include_usage": true
}Tool definition list for Function Calling Each tool requires a name, description, and parameter schema
[
{
"type": "function",
"function": {
"name": "string",
"description": "string",
"parameters": {}
}
}
]Legacy generation length limit parameter **Note**: Deprecated, please use `max_completion_tokens` instead
0Response
application/jsonResponse body
Unique identifier for the chat completion
"0668a381bdc3c0ded310e27c9a46d16e7"Model name actually used
"MiniMax-M3"Response type
"chat.completion"Creation timestamp (Unix seconds)
1777026807List of chat completion choices
[
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! I'm MiniMax-M3, and I can help you with conversation, writing, reasoning, coding, and many other tasks.",
"reasoning_content": "Let me analyze this problem...",
"reasoning_details": [
{
"type": null,
"id": null,
"format": null,
"index": null,
"text": null
}
],
"name": "string",
"audio_content": "string",
"tool_calls": [
{
"id": null,
"type": null,
"function": null,
"index": null
}
]
},
"finish_reason": "stop"
}
]Token usage statistics
{
"total_tokens": 1604,
"total_characters": 0,
"prompt_tokens": 1365,
"completion_tokens": 239,
"prompt_tokens_details": {
"cached_tokens": 114
}
}Whether the input content triggered a sensitive word filter. If the input severely violates policies, the API will return a content violation error with empty response content
trueType of sensitive word triggered by input (returned when `input_sensitive` is true): 1 severe violation; 2 pornography; 3 advertising; 4 prohibited content; 5 abusive language; 6 violence/terrorism; 7 other
0Whether the output content triggered a sensitive word filter
trueType of sensitive word triggered by output
0Status code and error details
{
"status_code": 0,
"status_msg": "string"
}
