How Much To Run AI
Open weights

MiniMax M3.1 Flash: API Setup, Thinking and Costs

MiniMax M3.1 Flash is a multimodal coding and agent model with a one-million-token context window. Use the MiniMax API for your application, MiniMax Code for an existing coding workflow, or the published weights with a compatible serving recipe. Thinking stays enabled, with an effort setting that changes how much reasoning the model performs. For a budget, count the full sequence of model calls, tool results and retries needed to finish the task.

Content reviewed:

MiniMax M3.1 Flash cost routes: API charges cover fresh input, cached input and output; self-hosting sizes 428B total parameters, rather than the 23B active per token, plus cache, vision, DSpark and runtime allocations.
Cost-boundary diagram. The 23B active count describes computation; complete self-host capacity depends on all weights and the serving recipe.

Use this model

API docs and console

Official model repository

Local tools and guides

Use cases

  • Connect a coding assistant to the exact MiniMax-M3.1-Flash API model.
  • Choose reasoning effort for a repeated coding or document task.
  • Estimate an agent run using fresh input, cached input and generated tokens.

Choose API access or a coding application

MiniMax announced M3.1 Flash on October 19, 2026, with access through its API, M Plan and MiniMax Code. An application subscription and a pay-as-you-go API account have different usage arrangements; use the API rates below for calls billed through the Open Platform.

MiniMax identifies Space Bunny (SpaceBunny) as an early version of M3.1 Flash. The exact MiniMaxAI/MiniMax-M3.1-Flash weights are now downloadable. The model card lists approximately 428B total parameters and 23B activated per token, with text, image and video inputs. Use the official serving recipes for local inference; installing the coding client alone still uses a hosted model.

Run the published weights with a hardware-specific recipe

The release combines MiniMax Sparse Attention throughout the model, quantization-aware training and an included DSpark draft head. The model card links deployment recipes for SGLang, vLLM and TokenSpeed. Start with the runtime version and flags for your GPU architecture and checkpoint format.

For a capacity sanity check, 428B parameters at two bytes each are about 856 GB of weight data; at one byte, about 428 GB; at half a byte, about 214 GB. These are decimal weight-only arithmetic, before mixed-precision tensors, scales, the draft head, KV cache, vision processing and serving buffers. The 23B active count describes per-token computation and cannot replace the total in a memory budget.

The vLLM guide supplies different recipes for TP4 GB200, TP4 MI355X and TP8 H100/H200. Its Hopper example limits context to 262,144 tokens, disables video input and does not enable DSpark. A model-level 1M context and video capability therefore do not transfer unchanged to every server recipe.

In an October 23 Hugging Face report, mmssix describes four RTX PRO 6000 Blackwell GPUs with the vllm/vllm-openai:minimax-m31-flash image, vLLM 0.1.dev23341+g8744dd2fb and checkpoint revision 54e4e69. Non-streaming split reasoning correctly, while streaming included thinking markup in content. The same report needed FP8 cache settings and an explicit draft attention backend on SM120. Treat this as a version-specific integration report; test streaming and tool parsing on the selected build before exposing them to users.

Download the exact weights before following a serving recipe
hf download MiniMaxAI/MiniMax-M3.1-Flash --local-dir ./MiniMax-M3.1-Flash

Unsloth 2-bit GGUF: smaller weights, a large memory budget

Unsloth publishes UD-Q2_K_XL in unsloth/MiniMax-M3.1-Flash-GGUF: four shards totaling 143.9 decimal GB, or 134.0 GiB. Download every shard and point the compatible server at the first. This is a third-party quantization of M3.1 Flash; retain the original model license and choose the exact format before sizing a machine.

For 16K text context and one slot, the guide’s table gives a 150 GiB planning target, while its prose recommends 160 GiB or more of combined RAM and VRAM, or unified memory. Use the larger budget and leave room for the OS and runtime; longer context, vision and DSpark add allocations. A 128 GiB machine cannot hold the 134 GiB weight set fully in memory.

Start with a MiniMax-M3.1-capable Unsloth Desktop build or the llama.cpp build linked from PR #31192 in the guide. Use 16K context and one slot first, then tune CPU/GPU offload. Image input needs the separate vision projector; DSpark needs its matching draft. The guide reports about 91.5% aggregate top-1 token agreement for Q2. That measures agreement with the reference distribution, rather than a 91.5% coding-task completion rate.

Download all four Q2 shards before following the compatible-runtime guide
hf download unsloth/MiniMax-M3.1-Flash-GGUF --local-dir ./MiniMax-M3.1-Flash-GGUF --include "UD-Q2_K_XL/*"

A four-Spark community deployment

Community author tonyd2wild documents an October 23 run across four 128GB DGX Sparks connected by RoCE. Repository revision 7b46c7f pins model revision 54e4e69 and the minimax-m31-flash-arm64-cu134 image, with vLLM 0.1.dev23341+g8744dd2fb, FP8 KV cache, DSpark k=3, 300,000-token maximum context and memory utilization 0.80. The downloaded weights total about 252.4 decimal GB; that is not the running-memory allocation of the four machines.

Their warmed, uncached streaming sweep requested 256 output tokens. A single 238-token prompt had 0.52-second time to first token and 22.2-token/s decode; a 97,259-token prompt had 65.96-second time to first token and 31.0-token/s decode. Faster output decoding therefore coexisted with a longer wait. The repository includes raw timings and measurement code. The author reports swapping and lost SSH responsiveness at utilization 0.85, while 0.80 completed the sweep; these conditions belong to that build and cluster. Budget all four machines and their setup time.

The weights use the MiniMax Community license

Commercial use requires visible attribution and a one-time notice to MiniMax. Products or services exceeding $20 million in annual revenue require prior written authorization. The license also contains prohibited-use conditions. Read the exact checkpoint license before choosing self-hosting for a commercial service; downloadable weights do not make this an Apache or MIT release.

Calculate the cost of a complete task

MiniMax’s direct API rates, checked October 20, are in USD per million tokens. Cached input means eligible cache reads, rather than every repeated word in a conversation. Use the provider’s usage accounting to separate cache hits from fresh input.

At $0.15 for fresh input, $0.015 for cached input and $0.60 for output, an assumed run with 100,000 fresh input tokens, 900,000 cached tokens and 20,000 output tokens costs $0.0405. Without those cache hits, the same one million input tokens and 20,000 output tokens cost $0.162. These are token-budget examples, not measured task bills.

Add together every model call in an agent run. Repository context and tool results can be sent again on later turns, while retries produce additional usage. Reconcile thinking and answer generation with the billable output reported by the provider rather than counting only the final answer shown to the user. Tool services and your own execution environment have separate costs.

Direct API itemUSD / 1M tokens
Fresh input$0.15
Cached input reads$0.015
Output$0.60

Make a first request with the OpenAI SDK

Create a MiniMax Open Platform API key and keep it on your server. Install the OpenAI Python package, set MINIMAX_API_KEY in your environment and use the MiniMax base URL. This example asks for a review plan; it does not grant a model access to your repository or execute tools.

Check the returned answer against the requested files and tests before connecting a tool loop. For multi-turn tool use, preserve the complete assistant message, including tool calls and reasoning_content, as described in MiniMax’s integration guide. Dropping these fields can break reasoning continuity.

Illustrative API request; running it incurs usage charges
import os
from openai import OpenAI

client = OpenAI(
    api_key=os.environ["MINIMAX_API_KEY"],
    base_url="https://api.minimax.io/v1",
)
response = client.chat.completions.create(
    model="MiniMax-M3.1-Flash",
    reasoning_effort="medium",
    messages=[{"role": "user", "content": "Plan tests for a CSV importer that must reject duplicate IDs."}],
)
print(response.choices[0].message.content)

Choose thinking effort before comparing speed

M3.1 Flash supports low, medium, high, xhigh and max effort; omission selects max. Thinking cannot be disabled: reasoning_effort="none" or a disabled thinking setting returns an error. An OpenAI-compatible endpoint therefore does not mean every setting from another provider transfers unchanged.

Start with one effort setting and a small set of tasks with known acceptance criteria. Record successful completions, generated tokens and elapsed time. Then try a lower effort on the same inputs. A shorter response is useful only if it still produces the correct patch, document or tool action.

Read the launch benchmarks in context

MiniMax reports more than 200 output tokens per second in some everyday-use conditions and a median above 170, alongside coding and agent benchmarks. These are publisher results, not a latency estimate for your connection or a completed coding task. A long prompt, reasoning effort and external tools can dominate the time a user waits.

Artificial Analysis’s October 24 model-page snapshot lists 87.2 output tokens per second for MiniMax’s API and flags high output-token use in its Intelligence Index evaluation. Its benchmark task cost accounts for input, cache, reasoning and answer usage. This is a separate test from MiniMax’s launch measurement; use the index to investigate token use and task cost rather than treating either generation-rate figure as an end-to-end agent time.

For an application comparison, keep the task, tool permissions, retry cap and completion criteria fixed. Compare total spend per accepted result with the existing DeepSeek workflow or another hosted text model, instead of ranking providers by isolated generation speed.

Before you use it

  • Thinking remains enabled even at the lowest supported effort.
  • A one-million-token context limit does not make repeated context free; track actual fresh and cached usage.

How to get started

Try one bounded API task, inspect the complete usage record, then connect tools with a fixed retry and spending budget.

Sources

Sources (12)

Calculators