Introduction
MiniMax M3.1 Flash API combines a 1,000,000-token input window with image and video understanding for coding agents; reasoning_effort changes thinking depth without switching models. M3.1 Flash reads image_url and video_url parts alongside text and replies in text; this endpoint does not accept audio, and video must be inline within the platform’s combined 14 MB media limit.
Key features & highlights
M3.1 Flash keeps reasoning active at low, medium, high, xhigh or max, defaulting to max; this endpoint exposes neither temperature nor top_p and does not accept none. Budget M3.1 Flash thinking and the visible answer together in max_tokens: the default is 4,096 and the ceiling 524,288; stop supports up to four sequences of at most 32 characters. M3.1 Flash allows up to 256 messages and 128 tool definitions in a request; images consume input tokens, so a large conversation and its media share the input budget.
Request parameters
| Parameter | Required | Description |
|---|---|---|
messages | Yes | Build the M3.1 Flash agent history in order, including media and complete prior assistant/tool exchanges; send video inline within 14 MB, with no audio parts on this endpoint. at least 1 items · at most 256 items |
max_tokens | No | Cap the combined thinking and visible answer for M3.1 Flash; default 4,096, maximum 524,288, and a reasoning-heavy turn can exhaust a small cap before returning prose. |
reasoning_effort | No | For M3.1 Flash, select low, medium, high, xhigh or default max; reasoning cannot be disabled and greater effort can consume more output tokens and time. |
stop | No | End an M3.1 Flash answer at a matching stop sequence, excluded from the returned text; use one string or at most four, each up to 32 characters. at least 1 characters · at least 1 items · at most 4 items |
tools | No | Offer up to 128 OpenAI-format function definitions to M3.1 Flash; use explicit argument schemas because your code, rather than the model, executes these functions. at most 128 items |
parallel_tool_calls | No | Allow M3.1 Flash to propose independent tool calls together; retain each call’s ID when sending back the separate execution results. Default: |
tool_choice | No | Guide the M3.1 Flash tool step with auto, none, required or a named function; none here disables tool selection, not the model’s reasoning. |
response_format | No | Request text or structured JSON for the M3.1 Flash result; validate the returned object before using it as a diagnostic record or executable input. |
Pricing
Input $0.15 / Output $0.60 per 1 million tokens
Use cases
This M3.1 Flash example asks for the next diagnostic tool calls, so review whether each proposed action follows from the supplied issue evidence. For M3.1 Flash tool loops, preserve the complete assistant response, including reasoning content and tool calls, then return execution results with the matching tool_call_id; your application remains responsible for validation and execution.
Prompt guide & pro tips
M3.1 Flash usage separates input, cached input and output; image and video processing consumes input tokens, while thinking consumes the output budget, with current rates listed on this page. For M3.1 Flash, SpicyAPI adds no separate content filter; the model determines its response, and neither multimedia input nor higher thinking effort guarantees NSFW output.
minimax/m3.1-flash/chat
API quick start
curl --fail-with-body -sN https://api.spicyapi.ai/v1/chat/completions \
-H "Authorization: Bearer $SPICY_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d '{
"model": "minimax/m3.1-flash/chat",
"messages": [
{
"role": "user",
"content": "Summarise the following release notes into three bullet points."
}
],
"stream": true
}' \
| jq --unbuffered -Rrj 'select(startswith("data: ")) | .[6:] | select(. != "[DONE]") | fromjson | if .error then "\n[error] \(.error.message)\n" else (.choices[0].delta.content? // empty) end'
See the API reference for authentication, the complete schema, polling, and error handling.
















