MiniMax M4: What It Is, What It Costs, and How to Start

How MiniMax M4 handles long coding tasks, what its benchmark scores measure, where to try it, and how to make your first API call.

Published

MiniMax M4: What It Is, What It Costs, and How to Start

MiniMax M4 gives a coding agent room to read a bug report, the files it touches and a long trail of test output together. MiniMax released the model on December 3, 2026, with a 1-million-token context window. Developers can call it through an API today. Teams that need to run it on their own machines are still waiting for the weights.

What fits in the MiniMax M4 context window?

A context window is the amount of material a model can consider in one request. Models count input and output in small units called tokens. A word can span several tokens. For a coding agent, that window has to hold more than source files. Imagine tracking down a checkout bug: the payment handler looks fine in isolation, but a test fixture uses an old field name and the failure only appears in a log. The advantage of a large window is that the agent can inspect all three together and still have room for the results of its next test.

M4 is a mixture of experts model. MiniMax gives two sizes: 2.74 trillion parameters in total, with 66 billion active per token. Parameters are the learned values that shape a prediction. A mixture of experts selects parts of the network for each token, so the first figure describes the whole model and the second describes the portion doing work on that token.

M4 can take text, images and video as input. A developer can include a screenshot of the broken checkout alongside the code. Someone who wants to generate a video should look at MiniMax H3, which MiniMax lists separately in its model catalog.

MiniMax’s M4 release page with links to API access and MiniMax Code
MiniMax M4

How M4 handles a long session on different chips

The longer the conversation, the more intermediate information a model has to keep nearby to generate the next token. Think of a mapmaker with a small desk and a deep set of drawers. The desk holds the sheets in use and an index. As the mapmaker finishes one sheet, an assistant fetches the next.

MiniMax calls the two parts of its design MiniMax Sparse Attention 2 (MSA2) and MFlashKV. MSA2 selects relevant blocks of earlier context and predicts which blocks the model will need next. During generation, MFlashKV keeps frequently used blocks and their indices in fast chip memory and puts most of the remaining key/value cache, the saved work from earlier tokens, on solid-state drives. MiniMax names Huawei’s 950DT and T-Head’s Zhenwu M890 SuperNode among the hardware this design lets it use.

A small map desk holds the working sheets while a cartographer retrieves another from the drawers below
Looking ahead lets M4 fetch a cached block while the preceding layer is still computing.

What MiniMax measured on coding tasks

MiniMax gave M4 an empty directory and a 24-hour window to build a desktop browser without using an existing browser engine. The company reports more than 4,000 tool calls as the model wrote Rust and debugged its own rendered output. That example shows what MiniMax means by a long task: the agent changes code, inspects what happened and revises its work over many turns.

The benchmark scores are easier to interpret with the evaluator attached. In its technical report, Table 2 and Appendix B, MiniMax reports 40.0 on ProgramBench from its own evaluation using OpenCode. On Terminal Bench 4.1, MiniMax lists 56.6 for M4 and 68.2 for Kimi K3.1 Pro, sourcing the Kimi score from Artificial Analysis. MiniMax reports its main M4 results at maximum reasoning effort.

One qualification matters if you saw the WebDev leaderboard: MiniMax says its M4 entry used automated evaluation, while competitors’ ratings came from human votes. If your product owner cares whether the generated checkout feels right, have the same reviewer use both versions. A different judge can change what a score tells you.

Where you can use M4 today

MiniMax’s API is the direct route for an application. Its API pricing is $0.80 per million input tokens, $3.10 per million output tokens and $0.05 per million cached input tokens read.

M Plan is the coding subscription. It includes access through MiniMax Code and publishes setup guides for editors and agents including Cursor and Claude Code. Choose this route if the person doing the work wants to use M4 from a coding tool. For the company’s broader product lineup, see the MiniMax AI review.

MiniMax Code desktop app and download options
MiniMax Code

OpenRouter lists the model as minimax/minimax-m4. On December 4 its only listed provider was MiniMax, marked provisional. If your account excludes provisional providers, that setting matters before you try the request.

OpenRouter’s MiniMax M4 model page and provider listing
OpenRouter

Vercel AI Gateway uses the same minimax/minimax-m4 identifier. Vercel’s example passes it to the AI SDK and asks for a TypeScript debounce function. For an app that already routes through Gateway, that makes a small, isolated first request. Vercel says zero data retention for M4 will become available as more providers add support. If your workload requires that guarantee, wait for the M4-specific update.

Vercel AI Gateway’s model page for MiniMax M4
Vercel AI Gateway

Can you download the weights?

MiniMax had yet to publish downloadable M4 weights when we checked on December 4, 2026. The official M4 repository contains the technical report and figures. The weights are the learned values you would need to run the model yourself. MiniMax says it hopes to release them within the next few weeks, after internal and third-party safety evaluations. It gives no fixed date.

A branching map leads to an open hosted API window and a closed drawer for pending local weights
Hosted access was available at launch. Self-hosting depends on the weight release.

Make your first MiniMax API call

Start with a short text request so you can check credentials, the model ID and the response before giving an agent a repository.

  1. Sign in to the MiniMax API Platform. For pay-as-you-go, open API Keys, choose Create new secret key, then top up under Billing → Balance if needed. M Plan users get their Subscription Key under Billing → M Plan and need an active seat or credits. MiniMax account setup
  2. In Bash, run read -rsp 'MiniMax key: ' MINIMAX_API_KEY and paste your key at the hidden prompt. The command below uses that variable in the same shell.
  3. Send this request. It uses the direct model ID, MiniMax-M4, and the message format from MiniMax’s model invocation guide.
Bash
curl --silent --show-error https://api.minimax.io/anthropic/v1/messages \
  -H "Authorization: Bearer ${MINIMAX_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MiniMax-M4",
    "max_tokens": 4096,
    "output_config": {"effort": "low"},
    "messages": [
      {"role": "user", "content": "Write a TypeScript function that debounces another function."}
    ]
  }'

Look for a text block in the response’s content array. Reasoning is always on, and its tokens count toward max_tokens. If you receive stop_reason: "max_tokens" with no text, the model may have spent the allowance reasoning. When you add tools, preserve the full assistant content between turns, including thinking and tool-use blocks. Saving only the visible reply loses part of the history the next call expects. MiniMax’s API compatibility notes

When to try M4 alongside your current model

A team that spends hours reviewing agent-written changes should try M4 on a closed issue with a known acceptance test. Give both models the same starting commit, tools and time allowance. Keep the final patch, the test result, the amount billed for every attempt and the minutes a developer spends on review. A cheap run that needs a second attempt and a rewrite can be the more expensive way to close the issue.

Use the model you already pay for as the baseline. If that is GLM-5.4 or DeepSeek V4, record the exact variant you run. MiniMax’s launch table includes GLM-5.3 and DeepSeek-V4.1-Flash-1017; a score for one version cannot settle a choice involving another. The guide to Chinese AI models gives the wider shortlist. If your current workload is short, inexpensive and already meets its acceptance criteria, there is little reason to move it. Save the trial for a job where long context or repeated tool calls matter.

Is MiniMax AI better than ChatGPT?

That depends on the job and the model behind your ChatGPT session. For coding, compare the same issue with the same tools and ask a reviewer to accept or reject each patch.

Is MiniMax a Chinese model?

Yes. MiniMax is the Chinese company behind M4. Its model family also includes H3 for video.

Is MiniMax AI free or paid?

The direct M4 API is metered, and M Plan is a paid subscription. A public GitHub repository does not give you a free local copy of M4.

How much does MiniMax AI cost?

For the direct M4 API, use the three token rates above. Input, cached input reads and generated output have different prices. M Plan is billed separately.

Is MiniMax cheaper than DeepSeek?

Compare the exact models on a finished task. Include cached reads, generated tokens and retries for both, then divide each total bill by the number of accepted results.

Who is behind MiniMax AI?

MiniMax develops its own foundation models. OpenRouter and Vercel provide hosted access to M4.

How is MiniMax so cheap?

MiniMax credits its selective use of experts and its memory design with making M4 efficient to serve. The API rate tells you what you pay; it does not reveal the company’s margin.

Is MiniMax making money?

MiniMax reported revenue and an adjusted net loss in its interim results for the first half of 2026. Those results predate M4’s launch.

Is MiniMax AI safe?

For a coding pilot, give the agent a disposable checkout, a test command and no production credentials. For sensitive material, verify retention on the route you choose. MiniMax’s planned pre-release safety evaluations do not establish how a hosted provider handles your prompts.

Get Omid’s weekly field notes.

Published
Category
AI
Related Articles
Gemini 5: What Google Has Confirmed and Where the Krypton Rumor Came From

Gemini 5: What Google Has Confirmed and Where the Krypton Rumor Came From

Google has not announced Gemini 5. See where the Krypton name came from, what the preview code meant and which Gemini 4 model fits your work today.Dec 4, 2026AI
ChatGPT Classic Explained: Why You Have Two Apps and How to Switch

ChatGPT Classic Explained: Why You Have Two Apps and How to Switch

Why ChatGPT Classic appeared, what happens to your chats and projects, and how to switch on Mac or Windows before the reported retirement date.Dec 4, 2026AI
MedGemma: What It Is, What It Costs, and How to Start

MedGemma: What It Is, What It Costs, and How to Start

Choose between Google’s MedGemma 2 variants, see which one accepts audio, and follow the public model card’s example with its clinical limits in view.Dec 4, 2026AI
Claude Ultra: What Happened to Max 20x?

Claude Ultra: What Happened to Max 20x?

Max 20x moved to Claude Ultra. Check your account’s five-hour limit, compare Max with Ultra and see how annual Pro credit works before upgrading.Dec 4, 2026AI
Best AI Voice Changer in 2026: Murf, Voicemod, Kits AI and More

Best AI Voice Changer in 2026: Murf, Voicemod, Kits AI and More

Compare AI voice changers for recorded narration, live calls and sung vocals. See which free plans allow downloads and which voices you can publish.Dec 4, 2026AI
Pillowfort: How to Make Your First Game With Google Labs

Pillowfort: How to Make Your First Game With Google Labs

Make a game from a sketch with Google Labs’ Pillowfort. See who can use it, how to remix Bedtime Bounce and what players need to open a shared link.Dec 3, 2026AI
Claude Apple Watch

Claude Apple Watch

Set up Claude on Apple Watch, resume a work chat by voice, and check what Claude can read or approve when your iPhone stays behind.Dec 3, 2026AI
SubQ Savant: What Fits in 4 Million Tokens and How to Try It

SubQ Savant: What Fits in 4 Million Tokens and How to Try It

What SubQ Savant’s 4 million-token window includes, how to try the preview, and which claims about long-context accuracy have outside evidence.Dec 3, 2026AI
Newsletter

One letter, every Sunday.Working systems, not hot takes.

Weekly. No spam. Unsubscribe anytime.