MiniMax's OpenAI-compatible Chat Completions API provides image and video content parts for MiniMax-M3.1-Flash; streaming responses put incremental reasoning in reasoning_content and the main response in content, with fixed reasoning, sampling, and input limits.
Suitable tasks: Applications that use the OpenAI SDK or a compatible client to process text, image, and video inputs while distinguishing reasoning from the main response in real time.
Unsuitable tasks: Audio input, disabling M3.1 Flash reasoning, configurations that depend on tuning temperature / top_p, priority service tiers, or generating multiple candidate results in one request.
Supported model version: MiniMax-M3.1-Flash. The page also lists MiniMax-M3; this note records only M3.1 Flash-specific configuration. The input format section is the page's shared guidance for both models.
Supported client, agent, or API: OpenAI SDK and OpenAI-compatible Chat Completions at https://api.minimax.io/v1.
Recommended reasoning levels and parameters: Use low, medium, high, xhigh, or max for reasoning_effort; the page says the default when omitted is max. M3.1 Flash cannot disable reasoning.
from openai import OpenAI
client = OpenAI(
base_url="https://api.minimax.io/v1",
api_key="<MINIMAX_API_KEY>",
)
response = client.chat.completions.create(
model="MiniMax-M3.1-Flash",
reasoning_effort="max",
messages=[
{
"role": "user",
"content": [
{"type": "text", "text": "Summarize what happens in the image and video."},
{
"type": "image_url",
"image_url": {
"url": "https://example.com/image.png",
"detail": "default",
},
},
{
"type": "video_url",
"video_url": {
"url": "mm_file://file_id",
"detail": "default",
},
},
],
}
],
max_completion_tokens=4096,
)
print(response.choices[0].message.reasoning_content)
print(response.choices[0].message.content)detail accepts low, default, and high, with default as the default value; max_long_side_pixel can be used to control the image's longest side. Images support JPEG, PNG, GIF, and WEBP; videos support MP4, AVI, MOV, and MKV. Upload larger videos through the Files API first, then pass mm_file://{file_id} to video_url.
stream = client.chat.completions.create(
model="MiniMax-M3.1-Flash",
reasoning_effort="max",
messages=[{"role": "user", "content": "Explain this problem."}],
stream=True,
stream_options={"include_usage": True},
)
reasoning_buffer = ""
text_buffer = ""
for chunk in stream:
delta = chunk.choices[0].delta if chunk.choices else None
if delta and getattr(delta, "reasoning_content", None):
reasoning_buffer += delta.reasoning_content
if delta and delta.content:
text_buffer += delta.contentAccumulate reasoning and the main response separately; when saving the complete result, do not keep only content. In multi-turn function calls, also append the complete assistant response, including tool_calls, to the history to preserve the reasoning chain.
Set OPENAI_BASE_URL=https://api.minimax.io/v1 and OPENAI_API_KEY, and fix model to MiniMax-M3.1-Flash.
Use a string for content in a plain-text message; use a content array for a multimodal message, placing text, image_url, or video_url entries according to their types.
Choose detail and video fps as needed. Video fps defaults to 1 and accepts values from 0.2 to 5.
Use reasoning_effort to control reasoning depth; do not send none or thinking.type="disabled".
Set stream=True for streaming requests; set stream_options.include_usage=true when token usage is needed, and read reasoning_content and content separately.
Record the usage in the response to check input tokens. Image-token estimates are for capacity planning only: low is typically a few hundred and up to about 600, default is commonly 1k–3k and up to about 5k, and high is commonly several thousand and can exceed 15k.
| Item | Configuration visible on the official page |
|---|---|
| Image part | {"type":"image_url","image_url":{"url":"...","detail":"default"}} |
| Video part | {"type":"video_url","video_url":{"url":"mm_file://file_id","detail":"default"}} |
detail | low, default, high; default default |
max_long_side_pixel | Controls the longest side |
| Image formats | JPEG, PNG, GIF, WEBP |
| Video formats | MP4, AVI, MOV, MKV |
Video fps | Default 1; range 0.2–5 |
| URL or base64 video | Maximum 50 MB |
| Image | Maximum 10 MB |
| Request body | Maximum 64 MB |
| Files API video | Maximum 512 MB; referenced through mm_file://{file_id} |
reasoning_effort supports low, medium, high, xhigh, and max; it defaults to max when omitted, while none is unsupported and returns 400.
adaptive for thinking keeps reasoning enabled; sending {"type":"disabled"} to M3.1 Flash returns 400. The page gives this error: model "MiniMax-M3.1-Flash" requires adaptive thinking; thinking.type="disabled" (including reasoning.effort=none) is not allowed (2013).
When reasoning_split=true, reasoning goes into reasoning_content; when false, it goes back into <think> tags in content, but M3.1 Flash does not support setting this parameter to false.
stream_options.include_usage=true makes token usage available in streaming responses.
max_tokens is the old generation-length limit, and reasoning tokens count toward it; a value that is too small may produce finish_reason: "length" with empty content. New integrations should use max_completion_tokens.
Passing temperature has no effect because the model is fixed at 1; passing top_p has no effect because the model is fixed at 0.95, and any supplied value must be in (0, 1].
M3.1 Flash does not support service_tier; the deprecated function_call is unsupported and tools should be used instead. n supports only 1.
The page also notes that some OpenAI parameters, including presence_penalty, frequency_penalty, and logit_bias, are ignored; audio input is currently unsupported.
The input formats and size limits given on the page apply to OpenAI-compatible Chat Completions; they do not justify adding Anthropic API content-block structures.
reasoning_content must be retained as part of the response. Streaming rendering can show the main response immediately, but the application must define its own policy for displaying or persisting reasoning content.
Image-token counts are the official rough estimate for a single image, not a billing figure or fixed upper limit; use response usage or available token counting for exact usage. The page does not disclose a video-token estimate, billing formula, or precise maximum output limit.
max_tokens=4096 is only the documentation example value; reasoning tokens consume this limit, so it must not be treated as M3.1 Flash's maximum output capability.
Even if the client accepts fields such as temperature and top_p, they do not change M3.1 Flash's sampling values; do not present them as effective tuning parameters.
This page does not contain a complete model prompt. The note is classified as configuration and does not claim that a copy-ready model-specific prompt exists.
On 2026-10-21, the original page was opened and checked through the Tabbit exclusive task M31 prompt09 openai, covering Quick Start, Supported Models, Multimodal Input, the parameter table, Thinking Control, Streaming Response, and Important Notes. The raw extracted evidence is stored at /tmp/m31-openai-evidence.txt. The duplicate check confirmed that the target directory has no standalone entry for this URL; the existing 01/02 documents reference it only for navigation.
MiniMax M3.1 Flash