Choosing a model
Ten models, one base URL. Most people only ever need three of them. This page
tells you which one to put in the model field, and warns you about the one
setting that silently breaks reasoning models.
The short answer
| Your job | Model | Why |
|---|---|---|
| Agentic coding, long tool chains | minimax-m3 | The flagship. Built to hold a long plan together. |
| Everyday coding, edits, review | minimax-m2.7 | Balanced default. Good enough for most of the day. |
| High-volume, batch, background | minimax-m2.5 | Tuned for speed and volume. Terser, so less waiting. |
| Latency-sensitive, interactive UI | minimax-m2.7-highspeed | Same weights, latency-tuned serving. Costs 2x per token. |
| Very large documents | minimax-text-01 | 4M context. Cheapest per token in the catalog. |
| Role-play, character chat | minimax-m2-her | Dialogue tuning. Do not wire it into a coding agent. |
| Legacy configs | minimax-m2.1, minimax-m2 | Older generations, kept so old configs keep working. |
If you are wiring up a coding agent and you do not want to think about it: set
the main model to minimax-m3 and the background or "fast" model to
minimax-m2.5. That is what every agent guide in these docs does.
Cost is not the reason to pick a smaller model
Read the rate card before you optimise. Every standard M-series
model meters at the same rate: $0.30 per 1M input, $1.20 per 1M output. So
minimax-m2.5 is not cheaper per token than minimax-m3. Picking it saves you
money only because it tends to be terser.
Two things actually move your bill:
- Highspeed variants cost exactly 2x. Use them when time-to-first-token matters. Never use them for background or batch work.
- Tokens. Trimming context and capping output length saves far more than swapping models does.
minimax-text-01 is the one genuine price break: $0.20 in, $1.10 out.
The max_tokens gotcha
Read this one. It is the failure mode most likely to waste your first hour.
The M-series are reasoning models. Before they emit an answer they burn
tokens on internal reasoning, and that reasoning counts against max_tokens.
Set max_tokens too low and the whole budget gets eaten by thinking. The
request succeeds, returns HTTP 200, bills you for the tokens, and hands back
empty content.
Code
Code
Rules of thumb:
- Chat-style calls:
max_tokensof 2000 or more. A few hundred is not safe. - Agent loops and tool calling: 4000 or more. Reasoning plus a tool call argument blob adds up.
- Never use
max_tokensas a cost control. It does not shorten the reasoning, it just truncates the answer. If you want short output, say so in the prompt. - Empty
contentwithfinish_reason: "length"means you hit this. Raisemax_tokensand try again.
The same applies on the Anthropic surface, where max_tokens is a required
field. Do not pass a small number there either.
Code
Context windows
The standard M-series models carry about 205k tokens of context. That is enough
for a large repo slice or a long agent session. minimax-m2-her is smaller at
66k. minimax-text-01 is the outlier at 4M, which is why it is the model for
whole-book and whole-corpus work.
Context is not free. Every token you send is billed on every turn of a conversation. A long agent session re-sends its whole history each call, so context length compounds. Prune it.
What the models cannot do
The catalog is text in, text out. There are no embedding models, no image models, and no audio models on the gateway. If your pipeline needs embeddings, run them somewhere else and send the text results here.
Switching models mid-project
Model IDs are real provider names, not aliases. minimax-m3 will always mean
MiniMax M3. When the catalog changes we announce it first, and
GET /v1/models always returns what your key can reach right now.
During a provider incident a request may be served by a smaller model of the
same family rather than failing. The model field in the response reports what
actually served the request. See Models for the fallback ladders.
Related
- Models: the full catalog and rate card.
- Recipes: working code for each surface.
- Rate limits & caps: what happens at the monthly cap.