MiniMax/MiniMax M4
MiniMax M4 is MiniMax's natively multimodal flagship: a 2.74-trillion-parameter mixture-of-experts model with 66 billion active per token and a 1M-token context at one flat price. Built for long tool-using agent runs and coding, with adaptive thinking at five effort levels, image input, JSON output and tool calls.
Output
Send a message on the left. The reply appears here.
Availability 24 hours
Hourly success rate of all completed requests to this site.
Pricing
This model is priced by the usage dimensions listed here. Compare all pricing.
Prices are shown in USD. Charges depend on the model and your actual usage.
| Billing item | Our priceCurrent price |
|---|---|
| Input | $0.8/1M tokens |
| Cache read | $0.05/1M tokens |
| Output | $3.1/1M tokens |
README
MiniMax M4
minimax-m4 is MiniMax M4: 1M-token context and image input. Thinking is always on and reasoning_effort sets its depth from low to max. Tool calls and JSON output, with one per-token price across the whole context window.
Why Choose This?
- Long agent runs
- MiniMax built M4 for multi-step workflows that call tools over many turns and check their own work. Pass function definitions in tools and send the full history with each request.
- Effort you can dial
- Thinking is always on and adapts to the task; reasoning_effort sets how much it spends, in five levels from low to max. Higher effort writes more reasoning tokens, billed as output.
- One price across 1M tokens
- Input, cache read and output cost the same at any context length, and a repeated prefix is billed at the cache-read rate.
Parameters
| Parameter | Required | Description |
|---|---|---|
messagesarray | Required | Conversation history as a list of role and content messages. |
temperaturenumber | Optional | Sampling temperature. Lower is more focused, higher is more varied. |
top_pnumber | Optional | Nucleus sampling threshold. |
max_tokensinteger | Optional | Maximum number of tokens to generate. |
stoparray | Optional | Stop Sequences |
streamboolean | Optional | Stream the reply as server-sent events. Default: false. |
stream_optionsobject | Optional | Stream Options |
reasoning_effortenum | Optional | Reasoning Effort Options: low, medium, high, xhigh, max. |
response_formatobject | Optional | Format of the returned result, such as a URL or base64 data. |
toolsarray | Optional | Tools |
tool_choiceenum | Optional | Tool Choice Options: none, auto. |
How to Use
- Try it here first — Sign in and run the model in the playground above to check the output before you write code.
- Create an API key — Open Console → API Keys and create a key. The same key works for every model.
- Write your messages — Put the task and its context in the messages array; add a system prompt to set the assistant behavior.
- Set optional parameters — Adjust the optional parameters listed above to control the output.
- Send the request — Call POST /v1/chat/completions with the model ID minimax-m4.
- Read the reply — The reply and its token usage come back in the response and are logged in the console.
Writing Effective Prompts
Clear instructions get better answers. Tell the model who it is, what you need and how the answer should look.
1. Set the role and goal
Open with who the model should act as and what the task is. Put rules that never change in the system prompt.
You are a senior Python reviewer. Review the function below for bugs and readability.
2. Give the context
Paste what the answer depends on: documents, code, data or earlier decisions. Separate each part with a heading or tag.
3. Specify the output
Name the format, length and tone: a table, JSON with given keys, five bullet points, a 200-word summary.
4. Show an example
One or two input and output examples fix the style faster than a long description.
5. Iterate
When an answer misses, add the missing constraint to the prompt instead of starting over.
| Prompt | |
|---|---|
| Weak | Write about our product. |
| Strong | You are a B2B copywriter. Write three 40-word LinkedIn posts announcing our invoicing API for small accounting firms. Tone: confident, plain English, no emojis. End each post with a question. |
Pricing
| Billing item | Price |
|---|---|
| Input | $0.80 per 1M tokens |
| Cache read | $0.05 per 1M tokens |
| Output | $3.10 per 1M tokens |
Example: a request with 10,000 input tokens and 1,000 output tokens costs about $0.01.
Prices are shown in USD. Charges depend on the model and your actual usage. Compare all pricing
Best Use Cases
- Coding agents in your editorConnect Cursor, Cline, Codex or OpenCode through the OpenAI-compatible endpoint and let M4 plan, edit and run tests across a repository.
- Long-document analysisPut contracts, reports or a codebase into one request with room to spare in the 1M-token window, and ask for answers that cite the section they come from.
- Screenshot and chart reviewSend images with written expectations and ask the model to list what it sees, what differs and what it cannot verify.
- Structured extraction for pipelinesAsk for a JSON object with named keys, or define functions as tools, and validate the result in your code.
Pro Tips
- Start at low effort — Use reasoning_effort low for routine replies and raise it only for steps that fail; usage.completion_tokens_details.reasoning_tokens shows what the reasoning cost.
- Reuse a stable prefix — Keep the system prompt and shared context identical at the start of each request so repeated tokens are billed at the cache-read rate.
- Leave room for reasoning — Reasoning tokens count toward max_tokens; a tight limit can end the reply with finish_reason length before any answer text.
FAQ
What is MiniMax M4?
minimax-m4 is MiniMax M4: 1M-token context and image input. Thinking is always on and reasoning_effort sets its depth from low to max. Tool calls and JSON output, with one per-token price across the whole context window.
How do I call the MiniMax M4 API?
Send POST /v1/chat/completions with the model ID minimax-m4 and your API key. Ready-to-run samples are in the API section above.
How is billing calculated?
Charges are based on the selected model, its billing method, and your actual usage.
Where do I get an API key?
Create one in Console → API Keys. The same key works for every model on the gateway.
Can I use the output commercially?
Yes. You can use what you generate in commercial projects, subject to the model provider’s terms.
About MiniMax M4 on DreamTo
minimax-m4 is MiniMax M4: 1M-token context and image input. Thinking is always on and reasoning_effort sets its depth from low to max. Tool calls and JSON output, with one per-token price across the whole context window.

