AI DevelopmentLLMs

MiniMax M3.1 Flash: A Cheap Open-Weight Model for Coding Agents

October 26, 2026
13 min read
Long-exposure light trails racing through a tunnel
Share:

On October 19, 2026, MiniMax released M3.1 Flash, a native multimodal mixture-of-experts model built for coding agents, computer use and security work. It had already been running anonymously as “Space Bunny”, and on October 23 the weights landed on Hugging Face. The API name is MiniMax-M3.1-Flash, and it costs $0.15 per million input tokens and $0.60 per million output tokens, flat across a 1M-token window.

This is a practical guide, not a launch recap. Every number comes from MiniMax’s docs, model card and config, or from the vLLM recipe (all checked October 26, 2026). Benchmarks are labeled self-reported, and independent figures from Artificial Analysis and Vals AI are marked as such. I have not run the model myself, so there are no first-hand latency or quality claims here.

1. The spec sheet

MiniMax’s launch post, “MiniMax M3.1 Flash: Redefining Agent Performance and Cost”, is dated 2026-10-19. It rolls the model out on the API, on the M Plan subscription and in the MiniMax Code desktop app, and says a more capable Pro model will follow, without a date.

The Space Bunny story checks out at the source: MiniMax’s post says Space Bunny was an early version of M3.1 Flash and processed more than 200 trillion tokens while anonymous. The timeline around it comes from secondary reporting: SiliconANGLE says it appeared on OpenRouter in late September and testers tied it to MiniMax by probing its tokenizer.

Model card and docs at a glance

  • • Released: 2026-10-19 (MiniMax blog); weights at MiniMaxAI/MiniMax-M3.1-Flash on Hugging Face, first commit 2026-10-23
  • • License: MiniMax Community License, a custom license rather than an OSI one (details in section 6)
  • • Size: about 428B total parameters, 23B activated per token (model card)
  • • Experts (config.json): 128 routed + 1 shared, 4 routed per token; 60 layers, the first three dense
  • • Attention: MiniMax Sparse Attention (MSA) in every layer; a DSpark draft head ships in the repo
  • • Context: 1,000,000 tokens per the docs (max_position_embeddings is 1,048,576 in the config)
  • • Modalities: text, image and video in; text out
  • • Checkpoint: NVFP4 experts and MXFP8 dense layers; about 252 GB across 48 shards
  • • API: model MiniMax-M3.1-Flash at https://api.minimax.io/anthropic (recommended) or https://api.minimax.io/v1 (OpenAI format); OpenAI Responses is supported too
  • • Price per 1M tokens (pricing page): $0.15 input, $0.60 output, $0.015 cache read; flat, with no long-context tier
  • • Thinking: always on; effort low / medium / high / xhigh / max, and the API default is max

Why Hugging Face shows “220B”

The safetensors widget on the model page shows about 220B parameters, which looks like it contradicts the card’s 428B. My reading of the metadata: the config stores the experts as packed NVFP4, two 4-bit values per byte, and the counter reports those bytes as 206.6B “U8” parameters. Doubling them gives about 413B; add roughly 10.6B FP8 and 3.4B BF16/F32 weights and you get about 427B, in line with the card. MiniMax doesn’t explain this, so treat it as my arithmetic. For planning, use the unambiguous figure: about 252 GB on disk.

2. What changed vs MiniMax M3

MiniMax M3 launched in June with the same rough shape: about 428B total and 23B active parameters, a 1M-token context and native image and video input. The M3.1 Flash card says it keeps M3’s core MoE architecture with three changes, all aimed at serving cost and speed rather than a new model size.

One detail matters for how you read the rest: the M3.1 Flash benchmark table has no M3 column. MiniMax’s “better than M3” story rests on its blog claims, and the clearest before-and-after numbers come from third parties.

The three architectural changes

đź§­

Sparse attention everywhere

The first three full-attention layers are replaced with MiniMax Sparse Attention, so MSA now runs in all 60 layers (the config’s sparse-attention map is all ones).

đź§Š

Quantization-aware training

Routed experts and attention paths are quantized during training. The checkpoint stores NVFP4 experts and MXFP8 dense layers, which shrinks memory and serving cost.

⚡

DSpark speculative decoding

DSpark replaces M3’s EAGLE-like MTP. The draft head lives in the repo’s dspark/ folder, so vLLM and SGLang need no separate draft model path.

MiniMax’s claims next to independent numbers

  • • Speed: MiniMax says online inference is “nearly three times faster” than its predecessor, with output above 200 tokens/s and a median above 170 (its TPS formula excludes time to first token). Artificial Analysis’s model page showed about 116 output tokens/s when I checked on October 26.
  • • Agent cost: MiniMax claims overall agent usage costs fall 70% and does not say how it measured that. VentureBeat, citing Artificial Analysis, puts the cost per Intelligence Index task at about $0.22 vs about $0.51 for M3, roughly 57% lower.
  • • Intelligence: Artificial Analysis Intelligence Index of 42 at launch per VentureBeat, up from 29 for M3; the model page showed 43 on October 26.
  • • Price per token: M3 lists $0.30 / $1.20 up to 512K input tokens (after a “permanent 50% off” from $0.60 / $2.40) and $0.60 / $2.40 above that. M3.1 Flash is a flat $0.15 / $0.60, so half of M3 below 512K and a quarter above it.
  • • Coding: Vals AI scores Vibe Code Bench v1.1 at 73.94% for M3.1 Flash vs 47.57% for M3.

Self-reported benchmarks (model card)

Order: M3.1 Flash / DeepSeek V4.1 Flash-1017 / Claude Opus 5, as published in MiniMax’s table; a dash means MiniMax lists no score. Harnesses vary by row: DeepSWE uses mini-SWE-agent at 512K context, Terminal Bench 4.0 uses Codex, CyberGym uses Claude Code at 1M.

  • • Automation-Bench v1.0.6: 62.8 / 60.5 / 50.3
  • • BankerToolBench: 76.2 / — / 76.2
  • • DeepSWE v1.1: 73.7 / 77.0 / 74.0
  • • Terminal Bench 4.0: 38.1 / 42.3 / 51.8
  • • NL2Repo-Bench: 61.2 / 68.2 / 75.3
  • • SWE Refactor Bench: 23.0 / — / 31.0
  • • OSWorld 2.0: 61.7 / — / 70.6
  • • CyberGym: 82.2 / — / —
  • • HLE (text-only subset, no tools): 43.4 / 42.6 / 55.6

How I read it

Even in MiniMax’s own table, DeepSeek V4.1 Flash-1017 leads on DeepSWE, Terminal Bench 4.0 and NL2Repo, and Opus 5 leads most coding rows. M3.1 Flash wins on business automation (Automation-Bench, BankerToolBench) and holds up on computer use for its price. That is a cost-per-task story, not a frontier-quality story, which is fine for a flash model.

3. Price check against other flash-tier models

Per token, M3.1 Flash is not the cheapest option. Claude Haiku 5.5 and GPT-6 Luna list lower prices on short prompts. Its edge is that the price stays flat across the whole 1M window, and coding agents routinely send prompts above 100K tokens once a session gets going.

List prices per 1M tokens (standard tier, USD, checked October 26, 2026)

Short-context or peak price first; long-context and time-of-day tiers are in the notes column. “Cache read” is the cache hit price.

ModelInputCache readOutputNotes
MiniMax M3.1 Flash$0.15$0.015$0.60Flat across the 1M window
DeepSeek V4.1 Flash (deepseek-flash, now the -1017 build)$0.30 peak / $0.15 off-peak$0.006 / $0.003$1.20 / $0.60Peak: 01:00–04:00 and 06:00–10:00 UTC, Monday to Friday
Claude Haiku 5.5$0.10$0.01$0.50Prompts over 100K tokens: $0.50 / $0.05 / $2.50
GPT-6 Luna$0.10$0.01$0.50Over 272K input tokens: $0.20 / $0.02 / $0.75
Gemini 3.8 Flash$0.75$0.075$3.75Doubles on January 1, 2027 to $1.50 / $0.15 / $7.50

Per-task cost matters more than per-token price. Artificial Analysis rates M3.1 Flash as very verbose (180M output tokens on its index vs a 100M median), and the API defaults to max effort. VentureBeat’s per-task figures from Artificial Analysis: about $0.22 for M3.1 Flash, $0.26 for DeepSeek V4.1 Flash and $1.24 for Gemini 3.8 Flash.

One job, five price lists (my arithmetic)

10M input tokens (no cache) plus 2M output tokens: M3.1 Flash costs $2.70 at any prompt length. DeepSeek V4.1 Flash costs $5.40 at peak and $2.70 off-peak. Claude Haiku 5.5 costs $2.00 if every prompt stays at or under 100K tokens and $10.00 if they all go over. GPT-6 Luna costs $2.00 under 272K and $3.50 above. Gemini 3.8 Flash costs $15.00 through December 31. Tokenizers and verbosity differ, so this compares price lists, not tasks.

4. Quickstart: the API in two SDKs

MiniMax recommends its Anthropic-compatible endpoint, which supports thinking blocks and interleaved thinking; the OpenAI-compatible one works too. These are MiniMax’s own samples, lightly trimmed, with the key read from an environment variable. Pay-as-you-go keys come from Account > API Keys; M Plan subscribers get a separate Subscription Key, and the two are not interchangeable.

Python: Anthropic SDK (recommended)

MiniMax’s sample sends effort max; I set high to show the knob. Thinking comes back as its own content block.

# pip install anthropic
import os
import anthropic

client = anthropic.Anthropic(
    base_url="https://api.minimax.io/anthropic",
    api_key=os.environ["MINIMAX_API_KEY"],
)

message = client.messages.create(
    model="MiniMax-M3.1-Flash",
    output_config={"effort": "high"},  # low | medium | high | xhigh | max (default: max)
    max_tokens=4096,
    messages=[{"role": "user", "content": "Hi, how are you?"}],
)

for block in message.content:
    if block.type == "thinking":
        print(f"Thinking:\n{block.thinking}\n")
    elif block.type == "text":
        print(f"Text:\n{block.text}\n")

Python: OpenAI SDK

Swap base_url and model in an existing OpenAI client. On this protocol the thinking arrives in reasoning_content, and content holds only the answer.

# pip install openai
import os
from openai import OpenAI

client = OpenAI(
    base_url="https://api.minimax.io/v1",
    api_key=os.environ["MINIMAX_API_KEY"],
)

response = client.chat.completions.create(
    model="MiniMax-M3.1-Flash",
    reasoning_effort="high",
    messages=[{"role": "user", "content": "Hi, how are you?"}],
)

print(response.choices[0].message.content)

Thinking rules from the docs

Thinking can’t be turned off. Sending thinking type disabled or effort none returns a 400 with the message that the model “requires adaptive thinking”. If you omit effort you get max, the slowest and most token-hungry level, so set it on purpose. The field is output_config.effort on the Anthropic endpoint, reasoning_effort on OpenAI chat completions and reasoning.effort on the Responses API.

5. Using it inside a coding agent

MiniMax documents both Claude Code and OpenCode setups, and also ships a wizard (npx -y mmx-cli@latest agent setup) that writes the config for you. For Claude Code, clear ANTHROPIC_AUTH_TOKEN and ANTHROPIC_BASE_URL from your shell first, including your ~/.bashrc or ~/.zshrc, because they override the settings file.

Claude Code: ~/.claude/settings.json (verbatim from MiniMax’s docs)

Then run claude in your project and check that /status shows api.minimax.io/anthropic and /model shows MiniMax-M3.1-Flash.

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.minimax.io/anthropic",
    "ANTHROPIC_AUTH_TOKEN": "<MINIMAX_API_KEY>",
    "CLAUDE_CODE_AUTO_COMPACT_WINDOW": "524288",
    "CLAUDE_CODE_EFFORT_LEVEL": "max",
    "ANTHROPIC_MODEL": "MiniMax-M3.1-Flash[1m]",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "MiniMax-M3.1-Flash[1m]",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "MiniMax-M3.1-Flash[1m]",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "MiniMax-M3.1-Flash[1m]"
  }
}

OpenCode: ~/.config/opencode/opencode.json (only if the model isn’t listed)

First run opencode auth login, pick “MiniMax Token Plan (minimax.io)” and paste your Subscription Key. Add this block only if your OpenCode version doesn’t list MiniMax-M3.1-Flash yet.

{
  "$schema": "https://opencode.ai/config.json",
  "provider": {
    "minimax-coding-plan": {
      "models": {
        "MiniMax-M3.1-Flash": {
          "name": "MiniMax-M3.1-Flash",
          "limit": { "context": 524288 }
        }
      }
    }
  }
}

Settings worth changing on purpose

  • • Both guides cap the client window at 512K (524,288 tokens) even though the model takes 1M. MiniMax’s ProgramBench comparison over 200 tasks found similar performance at 512K with 18.5% fewer tokens per task and about 20% lower estimated charges.
  • • The Claude Code example pins effort to max. While CLAUDE_CODE_EFFORT_LEVEL is set, /effort does nothing in a session; remove it if you want to switch with /effort low or claude --effort <level>.
  • • MAX_THINKING_TOKENS=0 and alwaysThinkingEnabled set to false don’t stop this model from thinking.
  • • MiniMax notes that some Claude Code versions send xhigh as high, so use max when you want the deepest setting.
  • • Web search isn’t built in on this route; MiniMax links a separate Web Search MCP guide.

Subscription Key vs pay-as-you-go key

Both agent guides are written for the M Plan: they ask for a Subscription Key from the plan console, and that usage counts against 5-hour and weekly windows shared with MiniMax Code. MiniMax’s usage docs say a pay-as-you-go API key is separate, can’t be swapped in for a Subscription Key, and is the one to use for production. Both docs use the same base URLs, but I haven’t tested a pay-as-you-go key in this settings file, so check it before you wire it into CI.

6. Self-hosting: the weights are real, the hardware isn’t small

The repo has been public since October 23: 48 safetensors shards plus a dspark/ draft folder, about 252 GB in total. The model card points to a vLLM recipe, an SGLang cookbook and TokenSpeed, and lists Transformers, KTransformers, unsloth and ATOM as integrations still in progress.

The vLLM recipe (updated October 23) runs TP4 on NVIDIA Blackwell (GB200, GB300, B200, B300) or AMD MI355X, and TP8 on a full H100 or H200 node. It requires vLLM 0.33.0 or newer, but the latest release on PyPI and GitHub when I checked was 0.32.0 (October 18). Until 0.33.0 ships, that means a nightly build, such as the vllm/vllm-openai:nightly image on Docker Hub, or a source build.

vLLM on one 8Ă—H100/H200 node (recipe command, verbatim)

The Hopper variant from the recipe: FP8 KV cache, NVFP4 experts on the Marlin kernel, 256K max context, tool calling on, video off.

hf download MiniMaxAI/MiniMax-M3.1-Flash --local-dir MiniMax-M3.1-Flash

vllm serve MiniMaxAI/MiniMax-M3.1-Flash \
  --tensor-parallel-size 8 \
  --reasoning-parser minimax_m3 \
  --block-size 128 \
  --kv-cache-dtype fp8 \
  --attention-config '{"indexer_kv_dtype": "fp8"}' \
  --compilation-config '{"cudagraph_mode": "FULL_AND_PIECEWISE"}' \
  --max-model-len 262144 \
  --max-num-seqs 80 \
  --limit-mm-per-prompt '{"video": 0}' \
  --gpu-memory-utilization 0.9 \
  --no-enable-log-requests \
  --disable-hybrid-kv-cache-manager \
  --moe-backend marlin \
  --enable-auto-tool-choice \
  --tool-call-parser minimax_m3

SGLang: the dev images from the cookbook

Support isn’t merged into SGLang main yet. Pull the dev image, then generate the launch command with the cookbook’s hardware picker.

docker pull lmsysorg/sglang:dev-minimax-m31-flash
# AMD MI350X / MI355X (ROCm 7.2):
docker pull lmsysorg/sglang:dev-minimax-m31-flash-mi35x

What serving it involves (vLLM recipe and SGLang cookbook)

  • • Hopper has no FP4 tensor cores, so the recipe uses FP8 KV and indexer caches, runs the NVFP4 experts on Marlin, and leaves DSpark off. Video inputs are disabled there; images still work.
  • • --block-size 128 is mandatory because it matches MSA’s sparse block size. Anything else fails with “No common block size for 16”. The tool-call and reasoning parsers are both minimax_m3.
  • • Per-request reasoning effort goes in chat_template_kwargs as reasoning_effort (low to max). The card recommends temperature 1.0 and top_p 0.95.
  • • SGLang: the cookbook says to build from a support PR whose number is still “TBD”, or use the dev images above. On Blackwell you also need MiniMax’s MSA kernels at a pinned commit and CUDA toolkit 13.4 or newer.
  • • The generic “pip install vllm” and “pip install sglang” snippets on the Hugging Face page don’t match these requirements today, so follow the recipe and the cookbook.

The license, in plain words

The weights ship under the MiniMax Community License, not an OSI license. Non-commercial use is free. Commercial use, which the license says explicitly includes selling API access and deploying fine-tuned derivatives, is allowed if you display “Built with MiniMax M3.1-Flash” and send MiniMax a one-time notice at api@minimax.io. Above $20 million in yearly revenue you need prior written authorization instead. An appendix bans several uses, including any military purpose. I’m not a lawyer: have counsel read it before you ship a product on it.

Golden rule

Self-host when data control or fine-tuning forces your hand, not to save money. A 4-GPU Blackwell or 8-GPU Hopper node is competing with an API that bills $2.70 for 10M input plus 2M output tokens.

7. Honest limits

Plan around these before you move real agent traffic.

Where I would be careful

  • • The benchmark table is MiniMax’s, its harness changes from row to row, and it has no M3 column. Even there, DeepSeek V4.1 Flash-1017 leads on DeepSWE (77.0 vs 73.7), Terminal Bench 4.0 (42.3 vs 38.1) and NL2Repo (68.2 vs 61.2).
  • • Independent runs land lower on long tasks. Vals AI scores Terminal-Bench 4.0 at 25.25% (vs 38.1 on the card under Codex) and calls the model weaker on long-horizon agentic work. Its Vals Index score is 53.78%, fifth of eleven open-weight models.
  • • Factual reliability: Artificial Analysis’s AA-Omniscience test, as reported by VentureBeat, found 56% correct answers and a 93% hallucination rate. That means 93% of its non-correct answers were confident wrong answers rather than abstentions. Keep tests, linters and schema checks in the loop.
  • • Always thinking and verbose: thinking can’t be disabled, the API default effort is max, and Artificial Analysis counted 180M output tokens on its index against a 100M median. Budget for output tokens, not just the per-token price.
  • • The speed numbers don’t agree yet: MiniMax cites 200+ tokens/s (median above 170), while Artificial Analysis showed about 116 tokens/s on October 26. Measure with your own prompts and region.
  • • Third-party listings lag. Artificial Analysis still labeled the model proprietary on October 26, three days after the weights went public. Some aggregator snapshots showed $0.60 / $2.40, which is M3’s pre-discount list price; MiniMax’s pricing page and Vals AI’s current page both say $0.15 / $0.60.
  • • MiniMax hasn’t published how it measured the 3Ă— speed or 70% agent-cost claims, and the Pro model has no date.

Hosted API and data handling

MiniMax publishes a separate privacy policy for each service; the Open Platform (API) one is at platform.minimax.io/protocol/privacy-policy. It renders client-side and I couldn’t load its text, and the third-party summaries I found disagree with each other, so I won’t repeat them. If you send proprietary code or personal data, read that policy and the API terms yourself, ask for a DPA if you need one, or run the weights under your own control.

Verdict

M3.1 Flash deserves a test this week if you run coding or automation agents at volume. The API speaks both Anthropic and OpenAI formats, MiniMax documents Claude Code and OpenCode setups, and the flat $0.15 / $0.60 price keeps long agent sessions predictable in a way that per-prompt-length tiers like Haiku 5.5’s 100K threshold don’t.

By MiniMax’s own numbers, it isn’t a replacement for a frontier model, and it trails DeepSeek V4.1 Flash on hard repo-level coding. Watch hallucinations and output-token spend, start below max effort, and decide on pass rate per dollar from your own tasks.

Try-it checklist

  1. 1. Create a pay-as-you-go key (or use your M Plan Subscription Key) and run the Anthropic SDK snippet with effort set to high.
  2. 2. Point one Claude Code or OpenCode profile at https://api.minimax.io/anthropic and confirm it with /status and /model.
  3. 3. Run 20 to 50 of your own tasks at medium, high and max, and log pass rate, output tokens and wall time per task.
  4. 4. Compare cost per solved task against your current flash model, using the table above for list prices.
  5. 5. Add verification (tests, schema checks) before you trust factual or security answers.
  6. 6. If you plan to self-host or sell anything built on the weights, read the license and the vLLM recipe first.
Diego Rodriguez

Diego Rodriguez

Senior Full-Stack & AI Engineer

Diego has 10+ years of experience building production-grade AI-powered applications, from LLM orchestration and RAG pipelines to ML-driven risk detection and algorithmic trading systems.

Learn more about Diego →