curl --request POST \
--url https://api.minimax.io/anthropic/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--data '
{
"model": "MiniMax-M3",
"thinking": {
"type": "adaptive"
},
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "What does this image show?"
},
{
"type": "image",
"source": {
"type": "url",
"url": "https://filecdn.minimax.chat/public/fe9d04da-f60e-444d-a2e0-18ae743add33.jpeg"
}
}
]
}
],
"max_tokens": 500
}
'{
"id": "066a3730f92943410551c4b4978ddad1",
"type": "message",
"role": "assistant",
"model": "MiniMax-M3",
"content": [
{
"thinking": "The user is asking what the image shows. I can describe this image of a young child.",
"signature": "db8ecae1e5a63cabebd69d2625983499bb498bfd329dde5c3cede76f12896336",
"type": "thinking"
},
{
"text": "This image shows a young girl, probably around 4-5 years old, photographed in a close-up portrait style. She has:\n\n- **Wavy, tousled light brown hair** with bangs that fall across her forehead, with some strands appearing slightly messy or windblown\n- **Large, expressive hazel-green eyes** that are looking directly at the camera\n- **A soft, subtle smile** giving her a warm, gentle expression\n- **Fair skin** with rosy cheeks, illuminated by warm, soft lighting\n\nShe's wearing what appears to be a **cream or off-white dress** with delicate lace or ruffled detailing around the neckline and shoulders.\n\nThe photograph has a **professional portrait quality**, with a softly blurred, neutral grayish-beige background and warm directional lighting that creates a classic, painterly aesthetic. The composition and styling suggest this could be a formal portrait or an AI-generated image with a vintage/realistic photographic style.",
"type": "text"
}
],
"usage": {
"input_tokens": 1209,
"output_tokens": 214,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 157
},
"stop_reason": "end_turn"
}Messages API (Anthropic-compatible)
Use the Anthropic API compatible Messages format to call MiniMax models.
curl --request POST \
--url https://api.minimax.io/anthropic/v1/messages \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: <content-type>' \
--data '
{
"model": "MiniMax-M3",
"thinking": {
"type": "adaptive"
},
"messages": [
{
"role": "user",
"content": [
{
"type": "text",
"text": "What does this image show?"
},
{
"type": "image",
"source": {
"type": "url",
"url": "https://filecdn.minimax.chat/public/fe9d04da-f60e-444d-a2e0-18ae743add33.jpeg"
}
}
]
}
],
"max_tokens": 500
}
'{
"id": "066a3730f92943410551c4b4978ddad1",
"type": "message",
"role": "assistant",
"model": "MiniMax-M3",
"content": [
{
"thinking": "The user is asking what the image shows. I can describe this image of a young child.",
"signature": "db8ecae1e5a63cabebd69d2625983499bb498bfd329dde5c3cede76f12896336",
"type": "thinking"
},
{
"text": "This image shows a young girl, probably around 4-5 years old, photographed in a close-up portrait style. She has:\n\n- **Wavy, tousled light brown hair** with bangs that fall across her forehead, with some strands appearing slightly messy or windblown\n- **Large, expressive hazel-green eyes** that are looking directly at the camera\n- **A soft, subtle smile** giving her a warm, gentle expression\n- **Fair skin** with rosy cheeks, illuminated by warm, soft lighting\n\nShe's wearing what appears to be a **cream or off-white dress** with delicate lace or ruffled detailing around the neckline and shoulders.\n\nThe photograph has a **professional portrait quality**, with a softly blurred, neutral grayish-beige background and warm directional lighting that creates a classic, painterly aesthetic. The composition and styling suggest this could be a formal portrait or an AI-generated image with a vintage/realistic photographic style.",
"type": "text"
}
],
"usage": {
"input_tokens": 1209,
"output_tokens": 214,
"cache_creation_input_tokens": 0,
"cache_read_input_tokens": 157
},
"stop_reason": "end_turn"
}MiniMax-M3Core capabilities: Coding/Agentic SOTA, 1M long context, multimodal.MiniMax-M3:- Image and video understanding — see the example code on the right
- Control thinking via the
thinkingparameter
Authorizations
Bearer API Key auth. Send Authorization: Bearer <API_KEY>. If Authorization and x-api-key are both present, Authorization takes precedence.
Headers
Media type of the request body, should be set to application/json to ensure JSON format
application/json Body
Model ID. MiniMax-M3 is a multimodal model with native support for text, image, and video input, alongside tool use and thinking content blocks. The M2.7, M2.5, M2.1, and M2 series support text and tool calls only and do not accept image or video input.
MiniMax-M3, MiniMax-M2.7, MiniMax-M2.7-highspeed, MiniMax-M2.5, MiniMax-M2.5-highspeed, MiniMax-M2.1, MiniMax-M2.1-highspeed, MiniMax-M2 Conversation history. MiniMax-M3 supports text, image, video, tool use, tool result, and thinking content blocks. The M2.7, M2.5, M2.1, and M2 series support text and tool-call content blocks only; they do not support image or video input.
Show child attributes
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). For MiniMax-M3 the recommended value is 131072 (128K) and the maximum is 524288 (512K); for other models the recommended value is 65536 (64K) and the maximum is 204800 (200K). Content exceeding the limit will be truncated. If generation stops due to length, try increasing this value
x >= 1Temperature coefficient, affects output randomness. Range [0, 2], default 1. Higher values produce more random output; lower values produce more deterministic output.
0 <= x <= 2Nucleus sampling parameter. Range [0, 1]. Default is 0.95 for MiniMax-M3 and 0.9 for M2.x models.
0 <= x <= 1Tool definitions for Anthropic-compatible tool use.
Show child attributes
Show child attributes
Tool selection strategy. Only auto and none are supported.
Show child attributes
Show child attributes
Controls MiniMax-M3 thinking. When omitted, thinking is disabled by default and responses do not include thinking blocks. For M2.x models, thinking cannot be disabled.
Show child attributes
Show child attributes
Request metadata. user_id is recommended for end-user-level aggregation, rate limiting, and billing analysis.
Show child attributes
Show child attributes
Response
Unique 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
Show child attributes
Reason for stopping generation:
- end_turn: Model ended naturally
- max_tokens: Reached max_tokens limit
- tool_use: Model requested tool use
end_turn, max_tokens, tool_use Token usage for this request, including prompt cache usage when applicable.
Show child attributes
Show child attributes