curl --request POST \
--url https://direct.evolink.ai/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "MiniMax-M4",
"input": "Please introduce yourself in one sentence.",
"max_output_tokens": 4096
}
'{
"id": "example_ae5b7d",
"object": "response",
"created_at": 1792405562,
"model": "MiniMax-M3.1-Flash",
"status": "completed",
"output": [
{
"id": "example_ae5b7d_rs",
"type": "reasoning",
"status": "completed",
"summary": [],
"content": [
{
"type": "reasoning_text",
"text": "We need solve CRT. Need only n. Compute. n=3 mod7, 5 mod11,7 mod13. Product 1001. Let's solve.\n\nUse n=3+7a. mod11: 3+7a=5 =>7a=2 mod11. inverse7=8 (56=1), a=16=5 mod11. a=5+11b. n=38+77b. mod13: 38+77b = 12+12b mod13 (77=12,38=12) equals7 =>12b=-5=8 mod13. inverse12=12, b=96 mod13 =5? 91 remainder5. n=38+385=423. Check 423 mod7 3 (420), mod11 5 (418), mod13 7 (416). Smallest positive 423. Only n."
}
],
"encrypted_content": "EXAMPLE_ENCRYPTED_CONTENT"
},
{
"id": "example_ae5b7d_msg",
"type": "message",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "423",
"annotations": []
}
]
}
],
"output_text": "423",
"usage": {
"input_tokens": 239,
"output_tokens": 190,
"total_tokens": 429,
"input_tokens_details": {
"cached_tokens": 174
},
"output_tokens_details": {
"reasoning_tokens": 189
}
},
"error": null,
"incomplete_details": null
}MiniMax Responses quickstart
Supported models: MiniMax-M4, MiniMax-M3.1-Flash. Required fields: model, input. max_output_tokens — Start with an output budget of at least 1,024 tokens. If reasoning uses the entire budget, the response may contain no answer text. See the API reference for tool calls, image and video input, streaming and multi-turn conversations.
curl --request POST \
--url https://direct.evolink.ai/v1/responses \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "MiniMax-M4",
"input": "Please introduce yourself in one sentence.",
"max_output_tokens": 4096
}
'{
"id": "example_ae5b7d",
"object": "response",
"created_at": 1792405562,
"model": "MiniMax-M3.1-Flash",
"status": "completed",
"output": [
{
"id": "example_ae5b7d_rs",
"type": "reasoning",
"status": "completed",
"summary": [],
"content": [
{
"type": "reasoning_text",
"text": "We need solve CRT. Need only n. Compute. n=3 mod7, 5 mod11,7 mod13. Product 1001. Let's solve.\n\nUse n=3+7a. mod11: 3+7a=5 =>7a=2 mod11. inverse7=8 (56=1), a=16=5 mod11. a=5+11b. n=38+77b. mod13: 38+77b = 12+12b mod13 (77=12,38=12) equals7 =>12b=-5=8 mod13. inverse12=12, b=96 mod13 =5? 91 remainder5. n=38+385=423. Check 423 mod7 3 (420), mod11 5 (418), mod13 7 (416). Smallest positive 423. Only n."
}
],
"encrypted_content": "EXAMPLE_ENCRYPTED_CONTENT"
},
{
"id": "example_ae5b7d_msg",
"type": "message",
"status": "completed",
"role": "assistant",
"content": [
{
"type": "output_text",
"text": "423",
"annotations": []
}
]
}
],
"output_text": "423",
"usage": {
"input_tokens": 239,
"output_tokens": 190,
"total_tokens": 429,
"input_tokens_details": {
"cached_tokens": 174
},
"output_tokens_details": {
"reasoning_tokens": 189
}
},
"error": null,
"incomplete_details": null
}https://direct.evolink.ai, which has better support for text models and long-lived connections. https://api.evolink.ai is the primary endpoint for multimodal services and serves as a fallback address for text models.POST /v1/responses — Supported models: MiniMax-M4, MiniMax-M3.1-Flash. Required fields: model, input. A minimal example also sets an output limit.
MiniMax-M4 and MiniMax-M3.1-Flash support Responses. For MiniMax-M3 and MiniMax-M2.5, use Chat Completions or Messages.Use input for input, max_output_tokens for the output budget, and reasoning.effort for reasoning depth. MiniMax-M4 and MiniMax-M3.1-Flash always use reasoning. Reasoning effort: low, medium, high, xhigh or max (default). none returns HTTP 400. Higher effort typically uses more reasoning tokens and increases latency.Reading the answer text
output may contain reasoning, messages and tool calls. Read the output_text blocks in items with type="message". The first item may contain reasoning.
Assuming the response JSON has been parsed into response, extract the text as follows:
text = "".join(
part["text"]
for item in response.get("output", [])
if item.get("type") == "message"
for part in item.get("content", [])
if part.get("type") == "output_text"
)
print(text)
MiniMax-M4 262,144, MiniMax-M3.1-Flash 524,288. Start with an output budget of at least 1,024 tokens. If reasoning uses the entire budget, the response may contain no answer text. If status="incomplete" and incomplete_details.reason="max_output_tokens", raise the output limit.Authorizations
All APIs require Bearer Token authentication
Get API Key:
Visit API Key Management Page to get your API Key
Add to request header:
Authorization: Bearer YOUR_API_KEY
Body
| Model | Context (tokens) | Maximum output (tokens) |
|---|---|---|
MiniMax-M4 | 1,000,000 | 262,144 |
MiniMax-M3.1-Flash | 1,000,000 | 524,288 |
Only MiniMax-M4 and MiniMax-M3.1-Flash support Responses. For MiniMax-M3 and MiniMax-M2.5, use Chat Completions or Messages.
MiniMax-M4, MiniMax-M3.1-Flash "MiniMax-M4"
Required fields: model, input. Plain text is treated as one user message. For multiple turns, images, videos or tool calls, pass an array of input items. See the API reference for tool calls, image and video input, streaming and multi-turn conversations.
"Explain recursion in one sentence."
Response
Generated successfully
Responses API response object. In addition to the fields below, the response includes the request configuration, such as tools, tool_choice, temperature, top_p, text, reasoning, and max_output_tokens.
Output items in generation order:
reasoning: reasoning content, with an ID such as<id>_rs,content(reasoning_textblocks),summary(an empty array), andencrypted_contentmessage: final answer, with an ID such as<id>_msgandcontent(output_textblocks)function_call: a function call, with an ID such as<id>_fc_<index>,call_id,name, andarguments. Execute it on the client and return afunction_call_outputitem