MiniMax M3.1 Flash API
Available NewMiniMax M3.1 Flash is the fast tier of MiniMax's M3.1 generation, with a 1,048,576-token context window. On our 2026-11-18 check it answered correctly with thinking on and off, filled a tool call, returned valid JSON in JSON mode and streamed at about 146 tokens per second with a first token in 0.3 seconds. Thinking is on by default and returned in reasoning_content; the gateway maps reasoning_effort "none" to the switch this model actually honours. It runs on serverless GPUs in the United States.
Quickstart
Set INFERENCE_API_KEY to your key from the API Keys page, then run:
curl https://api.inferenceapis.com/v1/chat/completions \
-H "Authorization: Bearer $INFERENCE_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "MiniMaxAI/MiniMax-M3.1-Flash",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello! What can you do?"}
]
}'
import os
from openai import OpenAI
client = OpenAI(
base_url="https://api.inferenceapis.com/v1",
api_key=os.environ["INFERENCE_API_KEY"],
)
response = client.chat.completions.create(
model="MiniMaxAI/MiniMax-M3.1-Flash",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Hello! What can you do?"},
],
)
print(response.choices[0].message.content)
import OpenAI from "openai";
const client = new OpenAI({
baseURL: "https://api.inferenceapis.com/v1",
apiKey: process.env.INFERENCE_API_KEY,
});
const response = await client.chat.completions.create({
model: "MiniMaxAI/MiniMax-M3.1-Flash",
messages: [
{ role: "system", content: "You are a helpful assistant." },
{ role: "user", content: "Hello! What can you do?" },
],
});
console.log(response.choices[0].message.content);
When to use it
- A fast, cheap reasoning model with a 1M-token window: 146 tokens per second in our measurement at Flash-tier prices
- Long-document work where DeepSeek V4 Flash is the alternative and you want a second option at the same price
- You need vision
- You switch thinking off with reasoning_effort directly at the upstream: this model only honours thinking.type, which the gateway handles for you
What it costs in practice
| Workload | Cost |
|---|---|
| Chat assistant — 10,000 turns of 800 tokens in, 300 out | $3.94 |
| Long prompts or RAG — 10,000 requests of 8,000 in, 500 out | $19.90 |
| Generation-heavy — 10,000 requests of 500 in, 2,000 out | $16.60 |
Computed from the live rates below. This is a reasoning model, and thinking is billed as output, so real output counts run above the visible answer; see controlling reasoning to keep that down. There is no subscription or minimum; new accounts start with free credit.
Endpoint
Content-Type: application/json
/openai/v1/… is accepted too, so Groq-style base URLs work with only the host changed.
Model IDs and aliases
Send any of these as model; they all resolve to this model and bill at its rate.
| ID | Note |
|---|---|
MiniMaxAI/MiniMax-M3.1-Flash | Canonical |
minimax-m3.1-flash | Alias |
minimax-m3-1-flash | Alias |
Request body
| Parameter | Type | Description |
|---|---|---|
model required |
string | Model ID: MiniMaxAI/MiniMax-M3.1-Flash — also accepted: minimax-m3.1-flash, minimax-m3-1-flash |
messages required |
array | Conversation so far. Each item has a role (system, user or assistant) and content. |
max_tokens |
integer | Maximum number of tokens to generate (includes reasoning tokens — use a few hundred or more). |
temperature |
number | Sampling temperature. Higher values give more varied output. |
top_p |
number | Nucleus sampling cutoff. |
stream |
boolean | Stream the response as server-sent events. The final chunk includes usage. |
tools |
array | Tool definitions for function calling (OpenAI format). |
response_format |
object | {"type": "json_object"} for JSON mode. |
stop |
string | array | Sequences where the model stops generating. |
seed |
integer | Seed for more reproducible sampling. |
Response
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"model": "MiniMaxAI/MiniMax-M3.1-Flash",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hi! I can answer questions, write and edit text, help with code and more.",
"reasoning": "The user is greeting me and asking about capabilities..."
},
"finish_reason": "stop"
}
],
"usage": { "prompt_tokens": 28, "completion_tokens": 17, "total_tokens": 45 }
}
Controlling reasoning
Send reasoning_effort: "none" to switch thinking off. Model families disagree on the parameter for this, and the wrong one is silently ignored, so the gateway accepts one spelling on every model (also "minimal", reasoning: {"enabled": false} and thinking: {"type": "disabled"}) and sends the switch this model honours; the X-Thinking: off response header confirms it. On the Responses API use reasoning: {"effort": "minimal"}. Leave thinking on for multi-step coding and maths; turn it off for extraction, classification, routing and chat. All models compared.
resp = client.chat.completions.create(
model="MiniMaxAI/MiniMax-M3.1-Flash",
reasoning_effort="none", # thinking off; omit it to let the model reason
messages=[{"role": "user", "content": "Extract the invoice number from: ..."}],
max_tokens=500,
)
print(resp.choices[0].message.content)Token counts are single measurements from September 17, 2026 and vary with the question; the direction is what matters.
Pricing
| Input | $0.20 / 1M tokens |
| Cached input | $0.02 / 1M tokens |
| Output | $0.78 / 1M tokens |
| Billing | Pay as you go from prepaid credits. No subscription, no daily request or token cap. See all pricing. |
Notes
- $0.20 input / $0.78 output per million tokens, cached input $0.02: the same bracket as GLM 5.3 Flash and DeepSeek V4 Flash, with a larger window than GLM.
- At the upstream, reasoning_effort is ignored by this model and only thinking.type "disabled" or reasoning.enabled false switch thinking off. Through this endpoint any of the three spellings works.
Compare MiniMax M3.1 Flash with…
Errors
Errors use the OpenAI envelope: {"error": {"message", "type", "code"}}. 401 missing or invalid key · 402 insufficient_balance · 404 model_not_found · 503 model_unavailable · 502 backend error, safe to retry. Full table with what to retry: API documentation. Errors from other providers: provider error reference.
