EN ▾

Uncensored API, transparent billing, no fluff.

MiniMax M2.5 Context Window vs Our 100k Limit

People who search minimax m2.5 context window usually want to know how much text they can send in one request. On this site the answer is 100,000 tokens, counted across the prompt and the completion together.

Updated

A glass tube nearly full of stacked tiles, showing a context window close to its limit

Key points

  1. The window is 100,000 tokens, shared by your prompt and the model's reply.

  2. A prompt that fills 90,000 tokens leaves about 10,000 for the answer.

  3. Filling the whole window with input costs $0.015 at $0.15 per 1M tokens.

  4. Chat clients resend history each turn, so long sessions need trimming or summaries.

What the 100,000-token window means

The context window is the total amount of text the model can hold in view during one request. Here it is 100,000 tokens, and that number covers both directions: everything in your messages array plus everything the model generates. If your prompt is 70,000 tokens, the reply can use up to the remaining 30,000.

The max_tokens parameter is optional. If you leave it out, the completion may use whatever room is left in the window. If you set it, you set a ceiling below that room, which is a good way to stop an answer from running longer than you want to pay for.

This model is one open-weight model run by an independent provider. It is not the official MiniMax API, so the figure for any MiniMax model has to come from MiniMax. If you are weighing the two, look up their current documentation for the model you care about and compare it with the number on this page.

Converting tokens to words and pages

Tokens are chunks of text, not words. For ordinary English prose a common rule of thumb is that one token is about four characters, or roughly three quarters of a word. Treat the next numbers as estimates, because other languages, code and unusual names tokenize differently, and often worse.

TokensApprox. English wordsWhat it looks like
1,000750A long email
10,0007,500A magazine article
50,00037,500A short novella
100,00075,000A full-length novel, with nothing left for the reply

So in practice you can paste a long manuscript chapter set, a big log file or a stack of notes, but not a whole book plus a long answer. Plan on keeping some headroom, and check the real count in the usage field of each response while you tune.

Who actually needs a window this large

Most requests are far smaller than the limit. A one-shot question is a few hundred tokens. The window matters in four situations.

  • Long roleplay and fiction sessions. A character sheet, a world description and a few hundred turns of dialogue can pass 50,000 tokens. The model only remembers what is inside the window, so this is where the size shows.
  • Document questions. Paste a long contract, transcript or set of chapters and ask for a summary or a list of inconsistencies.
  • Code review. Several files in one prompt let the model see how they call each other.
  • Few-shot prompts. Dozens of worked examples for a formatting or classification task fit easily.

If your task is a short prompt with a short answer, the window size is not a deciding factor, and you can ignore this page.

The cost of filling the window

Context is billed as input at $0.15 per 1M tokens, so large prompts are cheaper than most people expect. A full 100,000-token prompt costs 100,000 x $0.15 / 1,000,000 = $0.015. That is a cent and a half, before any output.

A more realistic request sends 95,000 tokens and receives 5,000. Input: $0.01425. Output: 5,000 x $0.50 / 1,000,000 = $0.0025. Total $0.01675.

The risk is repetition. A chat that resends a growing history pays for the old turns again on every message. Suppose each turn adds about 1,000 tokens. Turn 50 sends about 50,000 input tokens, which costs $0.0075 for that turn alone. Fifty turns in total send about 1,275,000 input tokens (1,000 x 50 x 51 / 2 is 1,275,000 as a rough sum), costing about $0.19 in input. Not expensive, but a client that never trims will hit the limit sooner or later, and then the request fails.

What happens at the limit

If prompt plus requested completion cannot fit, the request is rejected rather than quietly cut. Failed requests are not charged, so you lose time, not money. The fix is on your side: shorten the prompt or lower max_tokens. The request body is also capped at 8 MB, but you will reach the token limit long before the size limit with ordinary text.

Plan for the limit in your client. The steps below work for most chat apps.

  1. Keep the system prompt and any character or task definition at the top, always.
  2. Keep the most recent turns verbatim.
  3. Replace older turns with a short summary that the model itself can write, in a separate request.
  4. Trigger the summary when the history reaches roughly 70% of the window, so there is room left for a long reply.

Trimming history in code

This helper keeps the system message and drops the oldest turns until an estimated size fits a budget. It uses the four-characters-per-token rule, which is rough but safe when you leave headroom.

from openai import OpenAI

client = OpenAI(base_url="https://api.minimaxnsfw.cc/v1", api_key="YOUR_KEY")

BUDGET = 70_000  # leave room for the reply

def est_tokens(msg):
    return len(msg["content"]) // 4 + 4

def trim(messages):
    system, rest = messages[0], messages[1:]
    while rest and sum(est_tokens(m) for m in [system] + rest) > BUDGET:
        rest.pop(0)
    return [system] + rest

history = [{"role": "system", "content": "You are a narrator for an adult fiction game."}]
history.append({"role": "user", "content": "Continue the story."})

resp = client.chat.completions.create(
    model="uncensored",
    messages=trim(history),
    max_tokens=2000,
)
print(resp.choices[0].message.content)
print(resp.usage.prompt_tokens, resp.usage.completion_tokens)

Compare your estimate against usage.prompt_tokens for a few requests and adjust the divisor. If you want streaming, the docs show the SSE setup, and the stream ends with a usage block.

Using the window well

Large windows do not mean uniform attention. With any long-context model, details buried in the middle of a very long prompt are easier to miss than details near the start or end. Put instructions at the top and repeat the key request at the bottom. For lookups across a big document, ask the model to quote the passage it relies on, which makes errors easy to spot.

Keep the sampling settings steady while you test. Parameters such as temperature, top_p, stop, seed and the penalties are passed through, so you can fix seed and compare runs with different prompt lengths. When you are ready to run it for real, the pricing page has the top-up amounts, and the API key page is where a new account claims its $0.50 trial.

Checking the limit with a quick test

You can measure the window instead of trusting any figure. Build a prompt of known size, for example a filler paragraph repeated until your estimate reaches 60,000 tokens, ask a question whose answer sits in the very first paragraph, and see whether the reply gets it right. Repeat at 80,000 and 95,000 tokens. Each probe costs a fraction of a cent: at 95,000 input tokens it is about $0.014 before output. A trial key is enough for this, because the test needs only a handful of requests.

Run the probes one at a time. Big prompts take longer to process, and a streamed request keeps its concurrency slot until the stream ends, so firing several at once on a trial key can trigger a concurrency error that has nothing to do with size.

Questions and answers

How big is the context window?

100,000 tokens, shared between the prompt and the completion.

Do I have to set max_tokens?

No, it is optional. Without it the completion can use the rest of the window, so set it when you want a ceiling on output cost.

Is this the same as the MiniMax M2.5 window?

This is a different, independently hosted open-weight model, so its limit is not tied to MiniMax. Check MiniMax's own documentation for their figure.

What does a full-window prompt cost?

A 100,000-token prompt costs $0.015 in input at $0.15 per 1M tokens, plus output tokens at $0.50 per 1M.

Is there a limit on request size?

Yes, the maximum body is 8 MB, but the 100,000-token limit is normally reached first.

Your key is one form away

Create an account, copy the key, change the base URL. That is the whole setup.

Get API key