🎉 MiniMax-M2.7: Peak Performance. Ultimate Value. Master the Complex. ➔ Try Now.
curl --request POST \
--url https://api.minimax.io/anthropic/v1/messages \
--header 'Content-Type: <content-type>' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"model": "MiniMax-M2.7",
"messages": [
{
"role": "user",
"content": "Hello"
}
]
}
'{
"id": "06379fa1dfdd9047604b8abc088ea75c",
"type": "message",
"role": "assistant",
"model": "MiniMax-M2.7",
"content": [
{
"thinking": "The user says \"Hello\". This is a simple greeting. We should respond politely, greet them back, maybe ask how we can help.\n",
"signature": "1c3a0ae890922669e9815a201f9b645abdaafe8d8b5a65a5e48f90830c6e0750",
"type": "thinking"
},
{
"text": "Hello! How can I help you today?",
"type": "text"
}
],
"usage": {
"input_tokens": 39,
"output_tokens": 40,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0
},
"stop_reason": "end_turn",
"base_resp": {
"status_code": 0,
"status_msg": "success"
}
}Use the Anthropic API compatible format to call MiniMax models, supporting role-playing, multi-turn conversations and other dialogue scenarios. Supports rich role settings (system, user_system, group, etc.) and example dialogue learning.
curl --request POST \
--url https://api.minimax.io/anthropic/v1/messages \
--header 'Content-Type: <content-type>' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"model": "MiniMax-M2.7",
"messages": [
{
"role": "user",
"content": "Hello"
}
]
}
'{
"id": "06379fa1dfdd9047604b8abc088ea75c",
"type": "message",
"role": "assistant",
"model": "MiniMax-M2.7",
"content": [
{
"thinking": "The user says \"Hello\". This is a simple greeting. We should respond politely, greet them back, maybe ask how we can help.\n",
"signature": "1c3a0ae890922669e9815a201f9b645abdaafe8d8b5a65a5e48f90830c6e0750",
"type": "thinking"
},
{
"text": "Hello! How can I help you today?",
"type": "text"
}
],
"usage": {
"input_tokens": 39,
"output_tokens": 40,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 0
},
"stop_reason": "end_turn",
"base_resp": {
"status_code": 0,
"status_msg": "success"
}
}Documentation Index
Fetch the complete documentation index at: https://platform.minimax.io/docs/llms.txt
Use this file to discover all available pages before exploring further.
API Key Auth
Media type of the request body, should be set to application/json to ensure JSON format
application/json Model ID
MiniMax-M2.7, MiniMax-M2.7-highspeed, MiniMax-M2.5, MiniMax-M2.1 A list of messages containing the conversation history
Show child attributes
Set the role and behavior of the model
Whether to use streaming output, defaults to false. When set to true, the response will be returned in chunks
Specifies the upper limit for generated content length (in tokens), maximum is 204800. Content exceeding the limit will be truncated. If generation stops due to length, try increasing this value
x >= 1Temperature coefficient, affects output randomness, value range (0, 1], default value for MiniMax model is 1.0. Higher values produce more random output; lower values produce more deterministic output
0 < x <= 1Sampling strategy, affects output randomness, value range (0, 1], default value for MiniMax model is 0.95
0 < x <= 1Unique ID of this response
Object type, fixed as message
message Role, fixed as assistant
assistant Model ID used for this request
List of response content blocks
Show child attributes
Reason for stopping generation:
end_turn: Model ended naturallymax_tokens: Reached max_tokens limitstop_sequence: Hit a stop sequenceend_turn, max_tokens, stop_sequence Token usage for this request
Show child attributes
Error status code and details
Show child attributes