MiniMax-M2.5 - Complete API Reference
- Use OpenAI SDK format to call MiniMax-M2.5 model
- Synchronous processing mode, real-time response
- Text conversation: Single or multi-turn contextual dialogue
- System prompts: Customize AI role and behavior
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-M2.5"List of conversation messages, supports multi-turn dialogue
[
{
"role": "user",
"content": "Please introduce yourself"
}
]Maximum number of tokens for generated content, upper limit is 2048 **Note**: - Content exceeding the limit will be truncated - If generation is interrupted due to `length`, try increasing this value
2048Whether to return the response in streaming mode - `true`: Stream response, return content in real-time chunks - `false`: Wait for complete response before returning
falseSampling temperature, controls output randomness **Note**: - Lower values (e.g. 0.1): More deterministic, focused output - Higher values (e.g. 0.9): More random, creative output - Range: (0, 1], excluding 0
0.7Nucleus Sampling parameter **Note**: - Controls sampling from tokens with cumulative probability - e.g. 0.9 means selecting from tokens reaching 90% cumulative probability - Range: (0, 1], excluding 0 **Recommendation**: Do not adjust temperature and top_p simultaneously
0.9Whether to enable web search - `true`: Enable web search, the model will search the internet for latest information as needed - `false`: Disable web search
trueWeb search options, requires `enable_search: true`
{
"search_strategy": "max"
}Response
application/jsonResponse body
Unique identifier for the chat completion
"cmpl-04ea926191a14749b7f2c7a48a68abc6"Model name actually used
"MiniMax-M2.5"Response type
"chat.completion"Creation timestamp
1698999496List of chat completion choices
[
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hi there! How can I help you?"
},
"finish_reason": "stop"
}
]Token usage statistics
{
"prompt_tokens": 8,
"completion_tokens": 292,
"total_tokens": 300
}
