How to Set Up MiniMax M3: 12 Steps, 100 Min [2026]

MiniMax officially released M3 on June 1, 2026 with a 1,000,000-token context window, and within weeks it became one of the most searched open-weight models among developers building coding agents. The pitch is straightforward: a 428-billion-parameter mixture-of-experts model with a native 1-million-token context window, priced well under closed frontier models — by September 2026, OpenRouter was routing M3 traffic at just $0.23 per million input tokens and $0.96 per million output tokens — and available both as a hosted API and as downloadable weights. This tutorial walks through getting an API key, making your first call, wiring MiniMax M3 into a coding agent, and self-hosting the open weights if you have the hardware for it.

By the end you will have a working setup that covers the OpenAI-compatible API, the OpenRouter gateway, a local vLLM or SGLang deployment path, and a small tool-calling agent you can extend for real projects. Expect to spend around 100 minutes if you follow every step, less if you only need the hosted API.

Google · Preferred Sources

Don't miss new tech stories on Google

Add Tech Insider once in the Google app and our stories appear in your news suggestions.

Add Now

What Is MiniMax M3?

MiniMax M3 is the newest foundation model from MiniMax, a Chinese AI lab that has spent the last two years building long-context, multimodal, agentic models. It is a Mixture-of-Experts (MoE) model with roughly 428 billion total parameters, of which only about 23 billion activate per token — figures independently reported by Morph as of July 2026, though at least one other analysis, from Local AI Master, has described a smaller 229.9-billion-parameter configuration with 9.8 billion active parameters spread across 256 experts, so treat exact parameter counts as still somewhat unsettled depending on the source. That ratio is what keeps inference cost manageable despite the model’s size, since the router only wakes up a fraction of the network for any given request.

The headline feature is MSA, or MiniMax Sparse Attention, a blockwise sparse attention mechanism that replaces the standard quadratic attention pattern. MiniMax itself claimed in June 2026 that MSA delivers roughly 15.6x faster decode and 9.7x faster prefill than M2 at a full 1-million-token context, which is the piece of engineering that makes a genuine 1-million-token context window practical instead of theoretical. MiniMax M3 accepts text, images, and video as input and returns text output, which makes it useful for tasks like reading a UI screenshot alongside a bug report or reviewing a screen recording of a failing test run.

MiniMax describes the license as open-weight under a MiniMax community license rather than a fully permissive OSI-approved open source license. You can download and self-host the weights, but redistribution and some commercial terms carry restrictions worth reading before you build a product on top of them. The model card and weights sit on Hugging Face under MiniMaxAI/MiniMax-M3.

MiniMax M3 supersedes the earlier M2 generation, which had already built a following among developers running agentic coding workloads through OpenRouter. M3’s main upgrades are the MSA architecture, the jump to a native 1,048,576-token context window (with a 512,000-token max output), and multimodal input support that M2 lacked; analyst firm Hokai pegged that context expansion at roughly 5x the size of M2.7’s window as of June 2026.

MiniMax the Company: Background and Other Products

MiniMax has spent the last several release cycles focused on a specific niche: long-context, multimodal, agentic models that compete on price against closed frontier labs rather than trying to out-benchmark them on every leaderboard. The M-series, running from M1 through M2 and now M3, is the lab’s flagship line, but MiniMax also ships a broader platform with token plans built for enterprise workloads that need predictable monthly billing instead of raw pay-as-you-go rates.

That platform strategy matters for anyone evaluating M3 for production use. Rather than a single API endpoint, MiniMax offers tiered token plans alongside the standard per-token pricing covered in Step 5, which can work out cheaper for teams with predictable, high-volume usage. Check the MiniMax platform dashboard directly for current plan options, since token-plan pricing tends to change independently of the headline per-million-token rate.

The lab positions itself squarely against the wave of Chinese open-weight labs that shipped competing models in the same May-to-August 2026 window, including Z.ai, Moonshot, and Alibaba’s Qwen team. What sets MiniMax apart in that group is less about raw parameter count and more about the MSA architecture’s approach to context efficiency, plus a pricing structure that’s unusually transparent compared to some competitors who quote benchmark numbers without publishing clear per-token costs.

Prerequisites: What You Need Before You Start

You do not need much to start calling the hosted API. Self-hosting is a different story, so read both lists before deciding which path fits your project.

  • A MiniMax platform account at platform.minimax.io (free to create, pay-as-you-go billing)
  • Python 3.10 or newer, or Node.js 18 or newer, if you plan to use an SDK instead of raw curl
  • The openai Python package (version 1.x) or the openai npm package, since MiniMax M3’s hosted API is OpenAI-compatible
  • A credit card or prepaid token balance on the MiniMax platform for API billing
  • For self-hosting: at least 4 to 8 GPUs in the 80GB VRAM class (H100, H200, or equivalent), since a 428B MoE model does not fit on a single consumer card even quantized
  • vLLM 0.7 or newer, or SGLang, for self-hosted serving
  • Basic familiarity with REST APIs and JSON request bodies

If you only want to try the hosted API, skip straight to Step 1. If your goal is self-hosting from day one, read Step 8 and Step 9 first to confirm your hardware can actually run this model before you spend time on the API-only steps.

Step 1: Create a MiniMax Platform Account and Get Your API Key

Sign up at platform.minimax.io and verify your account. Once inside the dashboard, navigate to the API Keys section and generate a new key. Copy it immediately since most platforms only show the full key once.

Store the key as an environment variable rather than hardcoding it into scripts. On macOS or Linux:

export MINIMAX_API_KEY="your-key-here"
export MINIMAX_BASE_URL="https://api.minimax.io/v1"

On Windows PowerShell, use $env:MINIMAX_API_KEY = "your-key-here" instead. Load a small token balance (even $5 to $10) before moving on, since the account needs a positive balance to make its first live call. The free trial credit some accounts receive is enough to complete every step in this tutorial without spending real money.

Step 2: Install the SDK and Set Up Your Environment

Because MiniMax M3 exposes an OpenAI-compatible endpoint at https://api.minimax.io/v1, you don’t need a proprietary SDK. Install the standard OpenAI client library and point it at MiniMax’s base URL instead of OpenAI’s.

pip install openai==1.*
# or, for a fresh virtual environment:
python3 -m venv minimax-env
source minimax-env/bin/activate
pip install openai==1.*

MiniMax also exposes an Anthropic-compatible endpoint at https://api.minimax.io/anthropic for teams already standardized on the Anthropic message format. Pick whichever matches your existing tooling, since both point at the same underlying model.

Step 3: Make Your First MiniMax M3 API Call

With the SDK installed and your key exported, send a basic chat completion request. Here’s the raw curl version first, since it’s the fastest way to confirm your key and billing are working before you write any application code:

curl https://api.minimax.io/v1/chat/completions \
  -H "Authorization: Bearer $MINIMAX_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "MiniMax-M3",
    "messages": [
      {"role": "user", "content": "Explain what a mixture-of-experts model is in two sentences."}
    ],
    "max_tokens": 300
  }'

If that returns a JSON object with a choices array and a completed message, your key and billing are both working. Now do the same thing with the Python SDK, which is what you’ll actually build against:

from openai import OpenAI
import os

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

response = client.chat.completions.create(
    model="MiniMax-M3",
    messages=[
        {"role": "user", "content": "Write a Python function that checks if a string is a palindrome."}
    ],
    max_tokens=500,
)

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

Watch the output carefully the first time. If you get an authentication error, double-check that the key is loaded into the environment variable and that you copied it without a trailing space, which is a common copy-paste mistake.

Step 4: Control Reasoning Depth With the Thinking Parameter

MiniMax M3 supports three reasoning modes through a thinking parameter, and choosing the right one matters for both latency and cost. enabled forces reasoning on every request. adaptive lets the model decide when extra reasoning steps are worth the extra tokens. disabled skips reasoning entirely to minimize latency, which is what you want for simple lookups or autocomplete-style requests.

response = client.chat.completions.create(
    model="MiniMax-M3",
    messages=[
        {"role": "user", "content": "Debug this race condition in a Go goroutine pool."}
    ],
    extra_body={"thinking": "adaptive"},
    max_tokens=1500,
)

For a coding agent that handles both trivial and hard tasks, adaptive is the safer default. Set it to disabled only when you’ve profiled a specific workflow and confirmed the model doesn’t need extra reasoning steps to get it right, and reserve enabled for tasks you know are genuinely hard, like multi-file refactors or tricky concurrency bugs.

Step 5: Understand the 1M-Token Context Window and Pricing Tiers

This is the step most tutorials skip, and it’s the one most likely to produce a surprise bill. MiniMax guarantees a minimum context window of 512,000 tokens on the standard tier, and pricing steps up once a request crosses that boundary, up to the model’s full 1,048,576-token window, a figure MiniMax has published consistently since the June 2026 launch.

TierContext RangeInput Price (per 1M tokens)Output Price (per 1M tokens)Cached Input
StandardUp to 512K tokens$0.30$1.20$0.06
Extended512K to 1M tokens$0.60$2.40$0.12

Prices above reflect MiniMax’s published standard rates as of mid-August 2026, but the number has been a moving target since launch. At release in June 2026, MiniMax’s own API priced M3 at $0.60 per million input tokens and $2.40 per million output tokens; that same month, reseller Atlas Cloud was already undercutting that at $0.30/$1.20 for hosted access, and by September 2026 OpenRouter had pushed gateway pricing down further still, to roughly $0.23 per million input tokens and $0.96 per million output tokens. So if you’re comparing quoted prices from a June 2026 blog post against your own invoice, that trajectory is why. Always check the current pricing page on the MiniMax platform or your chosen gateway before budgeting a production workload, since rates for new models tend to shift fast in the months after launch.

The practical takeaway: don’t dump your entire codebase into every request just because you can. A request that could fit in 400K tokens but gets padded to 600K crosses into the extended tier and roughly doubles your cost per token. Trim context to what the task actually needs.

Step 6: Connect MiniMax M3 to a Coding Agent

Most terminal-based coding agents, including Claude Code-style tools and other agent frameworks, support pointing at a custom OpenAI-compatible endpoint. Since MiniMax M3 already speaks that protocol, integration is usually a config change rather than a code change.

# Example environment-based config for an OpenAI-compatible agent CLI
export OPENAI_API_KEY="$MINIMAX_API_KEY"
export OPENAI_BASE_URL="https://api.minimax.io/v1"
export OPENAI_MODEL="MiniMax-M3"

Once the agent picks up these variables, it will route every completion, including tool calls, through MiniMax M3 instead of its default model. Test this with a small, low-risk task first, like asking the agent to summarize a file, before pointing it at a real refactor. Agent frameworks vary in how strictly they validate tool-call formatting, and it’s worth confirming the integration handles function calls correctly before trusting it with write access to a repository. If you’ve already set up an OpenRouter-based agent config, see our OpenRouter setup guide for the equivalent steps using that gateway instead of MiniMax directly.

Step 7: Access MiniMax M3 Through OpenRouter

If you’d rather not manage a separate MiniMax account and billing relationship, MiniMax M3 is also listed on OpenRouter with its full 1M context window and multimodal input support. This is useful if you’re already running other models through OpenRouter and want a single billing dashboard and a single API key across providers.

from openai import OpenAI
import os

client = OpenAI(
    api_key=os.environ["OPENROUTER_API_KEY"],
    base_url="https://openrouter.ai/api/v1",
)

response = client.chat.completions.create(
    model="minimax/minimax-m3",
    messages=[{"role": "user", "content": "Summarize the tradeoffs of blockwise sparse attention."}],
)
print(response.choices[0].message.content)

Gateway pricing on OpenRouter and other resellers like Gate.AI or Api.Airforce doesn’t always carry a markup over MiniMax’s direct rates the way it once did — by September 2026, OpenRouter was actually quoting M3 at roughly $0.23 per million input tokens and $0.96 per million output tokens, undercutting MiniMax’s own standard-tier pricing, which likely reflects competitive pressure among resellers rather than a stable long-term floor. In exchange for whatever the current rate happens to be, you get unified billing, easier model switching, and no separate account to manage. You can check the live MiniMax M3 model page on OpenRouter for current gateway pricing and uptime stats before committing to it as your primary path. For a full walkthrough of the setup process, see our dedicated how to set up OpenRouter guide.

Step 8: Self-Host the Open Weights With vLLM or SGLang

Self-hosting MiniMax M3 is a genuinely different undertaking from calling the API. A 428B-parameter MoE model with roughly 23B active parameters per token still requires enough total VRAM to hold the full expert set in memory, since MoE routing decides which experts activate per token but the whole network still needs to be loaded somewhere.

Realistically, that means a multi-GPU node with high-bandwidth interconnect (NVLink or InfiniBand), not a single workstation card. Download the weights from Hugging Face, confirm your serving framework supports the MSA attention implementation, and configure tensor and expert parallelism across your available GPUs.

# Example vLLM serve command (adjust tensor-parallel-size to your GPU count)
vllm serve MiniMaxAI/MiniMax-M3 \
  --tensor-parallel-size 8 \
  --max-model-len 524288 \
  --trust-remote-code \
  --port 8000

SGLang is the other commonly used path for MoE serving and tends to have stronger support for expert-parallel scheduling on newer sparse-attention architectures. Check the current SGLang documentation and vLLM documentation for the exact flags your installed version expects, since serving-framework support for brand-new architectures like MSA moves fast and flags change between point releases. If you’ve self-hosted other large open-weight models before, our vLLM setup tutorial covers the general installation and configuration steps in more depth.

Step 9: Choose the Right Quantization for Your Hardware

Full-precision self-hosting of a 428B model is out of reach for most teams outside a datacenter budget. Quantization is the lever that brings it down to something a smaller cluster can run, at some cost to output quality and, for very long contexts, to KV-cache memory pressure.

Deployment SizeRecommended SetupContext CeilingNotes
Small self-hosted (4x 80GB GPUs)8-bit or 4-bit quantized weights~128K-256K tokensKV-cache memory becomes the limiting factor before compute does
Mid-size cluster (8x 80GB GPUs)8-bit quantized or mixed precision~256K-512K tokensReasonable balance of quality and throughput for team-scale agentic coding
Full-scale (16+ GPUs, NVLink/InfiniBand)Near full precisionUp to 1M tokensMatches hosted API capability; only justified at high sustained request volume

At launch, official GGUF quantized builds were not confirmed as available from MiniMax directly, unlike the community GGUF ecosystem that quickly grows around most open-weight releases. Check Hugging Face for community-contributed quantized builds before assuming a specific format is supported, and verify compatibility with your serving stack before committing hardware budget to a particular quantization scheme.

Step 10: Build a Tool-Calling Agent Example

MiniMax M3’s OpenAI-compatible API supports the standard function-calling schema, which means existing tool-use code written for OpenAI models ports over with minimal changes. Here’s a minimal example that gives the model a single tool for reading file contents:

tools = [
    {
        "type": "function",
        "function": {
            "name": "read_file",
            "description": "Read the contents of a file at a given path",
            "parameters": {
                "type": "object",
                "properties": {
                    "path": {"type": "string", "description": "File path to read"}
                },
                "required": ["path"],
            },
        },
    }
]

response = client.chat.completions.create(
    model="MiniMax-M3",
    messages=[{"role": "user", "content": "Read config.yaml and tell me what port the server listens on."}],
    tools=tools,
    tool_choice="auto",
    extra_body={"thinking": "adaptive"},
)

tool_call = response.choices[0].message.tool_calls[0]
print(tool_call.function.name, tool_call.function.arguments)

From there, you execute the tool call in your own code, feed the result back into the conversation as a tool role message, and let the model continue. This is the same loop used by every OpenAI-compatible agent framework, which is exactly why MiniMax M3 drops into existing tooling with so little friction.

Sending Images and Video to MiniMax M3

Because MiniMax M3 accepts text, images, and video as input, it’s worth testing the multimodal path separately from plain text prompts, since the request format differs and the tokenizer counts image and video content differently than raw text. This matters for debugging workflows like reading a UI screenshot alongside a bug ticket, or reviewing a screen recording of a test failure.

response = client.chat.completions.create(
    model="MiniMax-M3",
    messages=[
        {
            "role": "user",
            "content": [
                {"type": "text", "text": "This screenshot shows a broken layout. What CSS property is likely misconfigured?"},
                {
                    "type": "image_url",
                    "image_url": {"url": "https://example.com/screenshots/broken-layout.png"}
                }
            ]
        }
    ],
    max_tokens=500,
)
print(response.choices[0].message.content)

Image and video inputs count toward your total token usage just like text does, and a single high-resolution screenshot can consume a surprising number of tokens depending on how the platform’s vision encoder processes it. If you’re building an agent that regularly attaches screenshots to bug reports or pull requests, log the token cost of a few representative images early so you can budget accurately rather than discovering the real cost once you’re already at scale. For video input specifically, check the current platform documentation for supported formats and length limits, since video tokenization is newer and more likely to have constraints that plain text and still images don’t.

Step 11: Track Token Usage and Control Costs

Every response from the API includes a usage object with prompt tokens, completion tokens, and total tokens. Log this on every call, not just when something breaks, since it’s the only reliable way to catch a workflow that’s silently drifting into the extended pricing tier.

response = client.chat.completions.create(
    model="MiniMax-M3",
    messages=messages,
    max_tokens=1000,
)

usage = response.usage
print(f"Prompt tokens: {usage.prompt_tokens}")
print(f"Completion tokens: {usage.completion_tokens}")
print(f"Total tokens: {usage.total_tokens}")

if usage.prompt_tokens > 512_000:
    print("WARNING: this request billed at the extended context rate")

Set a hard max_tokens ceiling on every request rather than leaving it unbounded. For agentic workflows that loop multiple tool calls per user turn, track cumulative tokens per session too, not just per individual API call, since a five-step agent loop can rack up more spend than a single long completion without any one call looking unusual on its own.

Step 12: Test Long-Context Document Analysis

The 1M-token window is the feature that separates MiniMax M3 from most closed models, so it’s worth testing directly rather than assuming it just works the way the marketing copy implies. Try feeding it something genuinely large, like an entire mid-size repository’s source files concatenated together, or a lengthy compliance document.

with open("full_codebase_dump.txt", "r") as f:
    codebase = f.read()

response = client.chat.completions.create(
    model="MiniMax-M3",
    messages=[
        {"role": "system", "content": "You are a senior code reviewer."},
        {"role": "user", "content": f"Here is an entire codebase:\n\n{codebase}\n\nIdentify the three riskiest architectural decisions."}
    ],
    extra_body={"thinking": "enabled"},
    max_tokens=2000,
)
print(response.choices[0].message.content)

Watch the latency here. Long-context requests take noticeably longer to process than short ones, and it’s worth measuring actual response times against your use case’s tolerance before building a user-facing feature around a full 1M-token prompt. For many tasks, retrieving the relevant 50K tokens with a search step first and only sending that to the model is faster and cheaper than brute-forcing the entire context window every time.

Complete Working Project: A Long-Context Code Review Agent

Putting the pieces above together, here’s a small but complete script that reviews a directory of source files using MiniMax M3, with token tracking and a cost guard built in. Save it as review_agent.py.

import os
import glob
from openai import OpenAI

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

def collect_source(directory, extensions=(".py", ".js", ".go")):
    chunks = []
    for ext in extensions:
        for path in glob.glob(f"{directory}/**/*{ext}", recursive=True):
            with open(path, "r", errors="ignore") as f:
                chunks.append(f"# File: {path}\n{f.read()}\n")
    return "\n".join(chunks)

def review_codebase(directory, max_tokens=1500):
    source = collect_source(directory)
    response = client.chat.completions.create(
        model="MiniMax-M3",
        messages=[
            {"role": "system", "content": "You are a senior code reviewer focused on security and architecture risk."},
            {"role": "user", "content": f"Review this codebase and list the top 5 issues, ranked by severity:\n\n{source}"}
        ],
        extra_body={"thinking": "adaptive"},
        max_tokens=max_tokens,
    )
    usage = response.usage
    tier = "extended" if usage.prompt_tokens > 512_000 else "standard"
    print(f"[usage] prompt={usage.prompt_tokens} completion={usage.completion_tokens} tier={tier}")
    return response.choices[0].message.content

if __name__ == "__main__":
    result = review_codebase("./my_project")
    print(result)

Run it with python3 review_agent.py against any local project directory. On a mid-size repository (a few hundred files), expect prompt tokens in the low hundreds of thousands, which keeps you comfortably in the standard pricing tier. Extend this by adding the tool-calling pattern from Step 10 to let the agent request specific files instead of dumping the entire tree, which cuts both latency and cost for large monorepos.

MiniMax M3 vs GLM-5.2 vs Kimi K2.7 vs Qwen3.8 Max

MiniMax M3 shipped into a crowded window. Z.ai’s GLM-5.2, Moonshot’s Kimi K2.7 Code, and Alibaba’s Qwen3.8 Max all landed within the same May-to-August 2026 stretch, each targeting the same agentic-coding audience. Here’s how the publicly confirmed specs compare.

ModelRelease DateTotal ParametersContext WindowLicense
MiniMax M3June 1, 2026~428B (MoE, ~23B active)1M tokensOpen-weight, community license
GLM-5.2 (Z.ai)June 18, 2026753B (MoE)1M tokensMIT (open source)
Kimi K2.7 Code (Moonshot)June 12-13, 2026Not fully disclosedLong-context, coding-focused refreshOpen-weight
Qwen3.8 Max (Alibaba)August 2026Not fully disclosedLong-contextMixed (some variants closed)

Independent, apples-to-apples benchmark tables across all four models were not consistently published as of this writing, so treat any specific SWE-bench or coding-benchmark percentage you see quoted elsewhere with some skepticism until you can trace it to a primary source. One data point worth noting: a June 2026 benchmark run by Ofox.ai put MiniMax M3 at 59.0% on SWE-Bench Pro, edging out GPT-5.5’s 58.6% on the same test, though a single third-party benchmark shouldn’t be read as a settled verdict across all four models. What is confirmed is positioning: GLM-5.2 ships under a fully permissive MIT license and has the larger parameter count, MiniMax M3 leans on its MSA architecture for context efficiency at a lower published price point, and both Kimi K2.7 and Qwen3.8 Max are pitched at similar long-horizon coding workloads without MiniMax’s specific pricing transparency. If your team is also evaluating Kimi against closed models, our Kimi K2.6 vs Claude Opus vs GPT-5.5 comparison covers the closed-model side of that tradeoff.

The practical advice: run your own benchmark on your own codebase and your own tasks before committing. Marketing benchmarks rarely reflect the specific mix of languages, frameworks, and bug patterns in a real production repository, and a 2 or 3 percentage point gap on a public leaderboard usually matters less than how a model handles the quirks of your actual stack.

A simple way to run that comparison without committing engineering time to four separate integrations is to route all four models through the same gateway, like OpenRouter, and swap the model string in an otherwise identical test harness. Feed each model the same 20 to 30 real tickets from your own backlog, score the outputs against your team’s actual acceptance criteria, and track cost per accepted fix rather than cost per token. That number, cost per accepted fix, tends to tell a very different story than the sticker price on a pricing page, since a cheaper model that needs two retries to get a fix right can end up costing more per solved ticket than a pricier model that gets it right the first time.

Keep in mind that all four of these models shipped within a roughly ten-week window in 2026, which means the competitive picture is still moving. A model that wins your internal benchmark in August could be matched or beaten by a point release in October. Re-run your comparison quarterly rather than treating a single evaluation as a permanent decision.

None of this replaces reading the actual release notes when a new version ships. Open-weight labs iterate fast right now, and a minor version bump can quietly change context handling, tool-call reliability, or pricing without much fanfare outside a changelog entry.

Common Pitfalls When Setting Up MiniMax M3

  • Assuming the license is fully open source. The MiniMax community license permits self-hosting but carries redistribution and commercial-use restrictions that a permissive MIT or Apache license wouldn’t. Read the license text before you build a product on the weights.
  • Ignoring the 512K pricing boundary. Requests that creep past 512K tokens silently double in price per token. Log prompt token counts on every call so this doesn’t show up as a surprise on your invoice.
  • Treating “open-weight” as “runs on my gaming PC.” A 428B MoE model needs a multi-GPU datacenter node even with quantization. This is not a model you self-host on a single RTX card.
  • Skipping the thinking parameter. Leaving it unset defaults to whatever the platform picks, which may not match what your workload actually needs. Set it explicitly for predictable latency and cost.
  • Mixing up model IDs between M2 and M3. Some gateways still list both models side by side. Double-check the model string in your request body, since MiniMax-M3 and older M2 identifiers are easy to confuse in a copy-pasted config.
  • Assuming official Ollama support exists at launch. No confirmed official Ollama build shipped alongside the June 2026 release. If you see a community Ollama package, verify it’s tracking the actual M3 weights before relying on it.
  • Not budgeting for tool-call loops. An agent that calls three tools per user turn racks up token spend three times faster than a single completion. Track cost per session, not just per call.

Troubleshooting MiniMax M3: 9 Common Issues

1. 401 Unauthorized errors. Your API key is either missing from the request header, expired, or was copied with a trailing space or newline. Regenerate the key from the platform dashboard and re-export it.

2. 429 rate limit errors. Your account tier has a requests-per-minute cap. Add exponential backoff to your client code, and check the platform dashboard to see if a higher tier is available for your account.

3. “Context length exceeded” on a request under 1M tokens. Some SDK defaults reserve a chunk of the context window for the response. Lower your input size or explicitly reduce max_tokens so the combined prompt and completion budget fits.

4. Streaming responses cut off mid-sentence. Check that your client is correctly parsing server-sent events and not closing the connection early on a timeout. Long-context requests take longer to complete, so a default HTTP client timeout tuned for short requests will trigger prematurely.

5. Tool calls not triggering even with tools defined. Confirm tool_choice is set to "auto" or the specific function name, and double check your tool schema is valid JSON Schema. A malformed parameters block silently disables tool calling on some OpenAI-compatible backends.

6. High latency on long-context requests. This is expected behavior, not a bug. A 1M-token prompt takes meaningfully longer to process than a 5K-token one. If latency is a hard constraint, retrieve only the relevant context instead of sending the full document every time.

7. Self-hosted server runs out of memory on startup. A 428B MoE model needs the full expert set loaded across your GPU cluster. If you’re getting OOM errors, you likely need more GPUs, a more aggressive quantization scheme, or both. Check your serving framework’s memory profiling output before increasing max-model-len further.

8. Wrong endpoint mismatch between OpenAI and Anthropic formats. If you’re getting malformed response errors, confirm you’re sending OpenAI-style message objects to /v1/chat/completions and Anthropic-style messages to the /anthropic path, not mixing the two formats against the wrong endpoint.

9. Billed at the extended tier unexpectedly. Check your logged prompt token counts against the 512K boundary. System prompts, tool definitions, and conversation history all count toward the total, so a request that looks short in your latest user message can still cross the threshold once everything else is added in.

Advanced Tips for Production Deployments

Use cached input pricing to your advantage. At $0.06 per 1M tokens on the standard tier, cached input costs a fraction of a fresh prompt. If your agent repeatedly sends the same system prompt or the same large reference document across many requests, structure your calls so that shared content stays in a cacheable prefix rather than being reconstructed differently each time.

Combine MiniMax M3 with a retrieval step for very large knowledge bases. Even with a 1M-token window, brute-forcing an entire document corpus into every request is slower and more expensive than retrieving the relevant 20K to 50K tokens first. Reserve the full context window for tasks that genuinely need whole-codebase or whole-document reasoning, like architectural review or cross-file refactors.

Build in a fallback path to a second provider. Because MiniMax M3 is available both directly and through OpenRouter, you can configure your application to retry against OpenRouter if the direct API has an outage, without changing your prompt logic. This is standard practice for any production system built on a single-vendor API, and it’s cheap insurance given how young this specific model still is.

Set the thinking parameter per task type rather than globally. A code-generation endpoint and a simple classification endpoint in the same application have very different reasoning needs. Hardcoding one global setting for both wastes tokens on the simple path or shortchanges quality on the hard one.

Finally, if you’re serving MiniMax M3 to end users through a coding agent or IDE plugin, log every tool call your agent makes, not just token counts. A model that’s technically correct but calls the wrong tool, or calls the right tool with malformed arguments, produces silent failures that are much harder to debug after the fact than a clean error message would be.

Frequently Asked Questions

Is MiniMax M3 free to use?
No. It’s pay-as-you-go through the MiniMax platform, priced at $0.30 per 1M input tokens and $1.20 per 1M output tokens on the standard tier (up to 512K context), with higher rates above that — down from MiniMax’s own $0.60/$2.40 launch-day pricing in June 2026, and cheaper still through gateways like OpenRouter, which was quoting roughly $0.23/$0.96 per million tokens as of September 2026. New accounts typically receive a small amount of free trial credit.

Can I run MiniMax M3 on a single GPU?
No. It’s a 428B-parameter MoE model that requires a multi-GPU node even with quantization applied. A single consumer or even single datacenter GPU cannot hold the full expert set.

Is MiniMax M3 fully open source?
The weights are open and downloadable, but under a MiniMax community license rather than a fully permissive OSI-approved license like MIT or Apache 2.0. Check the license terms before commercial redistribution.

What’s the difference between MiniMax M3 and MiniMax M2?
M3 introduces the MSA (MiniMax Sparse Attention) architecture, extends the context window to a native 1M tokens, and adds multimodal image and video input support that M2 did not have.

Does MiniMax M3 work with existing OpenAI SDK code?
Yes. The hosted API is OpenAI-compatible, so you only need to change the base URL and model name in existing OpenAI SDK code. Tool calling and streaming both follow the same format.

Can I access MiniMax M3 through OpenRouter instead of MiniMax directly?
Yes. It’s listed on OpenRouter with its full 1M context window, at a modest markup over MiniMax’s direct pricing, useful if you already manage other models through that gateway.

How does MiniMax M3 compare to GLM-5.2?
Both launched in the same window in June 2026 with 1M-token context windows. GLM-5.2 is larger at 753B parameters and ships under a fully open MIT license, while MiniMax M3 uses a more restrictive community license but publishes clearer, lower per-token pricing on its hosted API.

Is there an official Ollama build for MiniMax M3?
No confirmed official Ollama package existed at launch. If you find a community-maintained Ollama build, verify it’s tracking the actual released weights before relying on it for production work.

Nadia Dubois

Nadia Dubois

AI & Innovation Editor

Nadia Dubois is the AI & Innovation Editor at Tech Insider, where she tracks the rapid evolution of artificial intelligence, from foundation models to real-world enterprise deployment. She previously covered AI and startups for La Tribune and contributed to MIT Technology Review's European coverage. Nadia specializes in generative AI, AI regulation, and the intersection of technology and European industrial policy. She holds a dual degree in Computational Linguistics and Journalism from Sciences Po Paris.

View all articles