Back to blog

Models & comparisonsComparison

Which model fits a 100K-token document: context and output limits

Check in two steps whether a long document and its answer fit GLM-5.3-Flash, DeepSeek-V4-Flash or MiniMax-M2.7, and see what one 100K-token job costs.

By CheapTokens TeamPublished 5 min read

Cover: three model cards with context windows 390K, 380K and 180K for long documents
On this page
  1. The two-step check
  2. How big is your document, really?
  3. Run the check in code
  4. What one 100K job costs
  5. When the answer is the long part
  6. Which one for your case

Short answer: a 100K-token document goes into any of the three models in one request. What separates them is the room around it. GLM-5.3-Flash has a 390K context window, DeepSeek-V4-Flash has 380K and can write up to 32,768 tokens back, MiniMax-M2.7 has 180K. Two checks tell you which one to use: do the document and the answer fit the window, and does the answer fit the model's output limit.

The limits below are CheapTokens' own, checked on 1 November 2026, and they are what your request is measured against when you call https://api.cheaptokens.dev/v1. The docs show how to connect, and pricing has the full price list.

The two-step check#

Both rules use numbers you can know before you send anything:

  1. Input tokens + max_tokens ≤ context window. The document and the answer share one window.
  2. max_tokens ≤ the model's output limit.
Model API id Context Max answer Largest document with a full-length answer
GLM-5.3-Flash zai-org/GLM-5.3-Flash 390K 8,192 about 381K
DeepSeek-V4-Flash (0731) deepseek-ai/DeepSeek-V4-Flash-0731 380K 32,768 about 347K
MiniMax-M2.7 MiniMaxAI/MiniMax-M2.7 180K 8,192 about 172K

The last column is the window minus the longest answer, reading K as 1,000: 390,000 − 8,192 = 381,808; 380,000 − 32,768 = 347,232; 180,000 − 8,192 = 171,808. In practice you rarely ask for the longest possible answer, so you have more room than that column shows.

Context windows and the longest answer of the three models
Context windows and answer limits on CheapTokens, checked 1 November 2026

Here is the check on a real-looking case. You have a 200,000-token log and want a 2,000-token analysis: 200,000 + 2,000 = 202,000. That fits the 390K and 380K windows and does not fit 180K. Same log, same question, and one of the three is already out.

The two checks before a long request
The order of the check: count, add max_tokens, compare with the window and with the output limit

How big is your document, really?#

Pages are a poor unit, tokens are the real one. Say an English page is about 600 tokens (an assumption; real pages run from roughly 500 to 700). Then a 100K-token document is 100,000 ÷ 600 ≈ 167 pages. That is a thick contract or a long annual report, and it fits every model in the table with room to spare.

Guess the number

How many pages of English text is a 100K-token document?

Show answer

Answer: 170

About 170. At roughly 600 tokens a page, 100,000 ÷ 600 ≈ 167 pages. Dense legal text or tables push a page higher, so your own count may differ.

The page estimate is for planning. Before you send, count tokens with a tokenizer, or use the rough rule of about four characters per token for English. Each model has its own tokenizer, so a count is an estimate, and after the request the usage field of the response gives the exact numbers.

Run the check in code#

This script checks a contract against the limits above, sends it, and prints how the answer ended. Set CHEAPTOKENS_API_KEY first, and swap the model id to try the others.

python
import os
from openai import OpenAI

# context window, max answer tokens (CheapTokens, checked 1 Nov 2026)
LIMITS = {
    'zai-org/GLM-5.3-Flash': (390_000, 8_192),
    'deepseek-ai/DeepSeek-V4-Flash-0731': (380_000, 32_768),
    'MiniMaxAI/MiniMax-M2.7': (180_000, 8_192),
}

def fits(model, input_tokens, max_tokens):
    context, out_limit = LIMITS[model]
    return max_tokens <= out_limit and input_tokens + max_tokens <= context

client = OpenAI(
    base_url='https://api.cheaptokens.dev/v1',
    api_key=os.environ['CHEAPTOKENS_API_KEY'],
)

text = open('contract.txt', encoding='utf-8').read()
estimate = len(text) // 4   # rough: about 4 characters per token in English
model = 'zai-org/GLM-5.3-Flash'
max_tokens = 1500

if not fits(model, estimate, max_tokens):
    raise SystemExit('Does not fit: pick another model or split the text')

reply = client.chat.completions.create(
    model=model,
    max_tokens=max_tokens,
    messages=[
        {'role': 'system', 'content': 'Summarize contracts in 10 bullet points.'},
        {'role': 'user', 'content': text},
    ],
)
print(reply.choices[0].finish_reason)   # stop = ended on its own, length = cut by max_tokens
print(reply.usage.prompt_tokens, reply.usage.completion_tokens)

If it works, the first line prints stop and the second shows how many tokens went in and came out. If you see length, the answer hit max_tokens; this article explains the fix. And if the request is refused for size, request too long: 400 vs 413 walks through it.

What one 100K job costs#

Say you summarize contracts. Each one is 100,000 tokens, and the summary is about 1,500 tokens (assumptions, change them to match your files). The table below is live: it recalculates from current prices and puts the OpenRouter reference next to ours.

Model Cost OpenRouter
GLM-5.3-Flash $0.0021 $0.0035
DeepSeek-V4-Flash $0.0017 $0.0072
MiniMax-M2.7 $0.0052 $0.0627

100,000 input and 1,500 output tokens in total. Prices per 1M tokens are current and change together with our tariffs; the OpenRouter column shows reference prices for the same workload.

The document is the expensive side here, since you send far more than you get back. For one such job the totals are $0.0021 on GLM-5.3-Flash, $0.0017 on DeepSeek-V4-Flash and $0.0052 on MiniMax-M2.7. With input and output counted together, all three come out cheaper than OpenRouter. Prices are fixed per model with no peak hours, so a night batch costs the same as a daytime one.

Now scale it to your day. Move the sliders to your own load and read the total:

Cost calculator

One day of contract summaries

Input tokens per request: 100,000 · Output tokens per request: 1,500 · Requests per day: 40

ModelPer dayPer month
GLM-5.3-Flash$0.0824$2.47
DeepSeek-V4-Flash$0.066$1.98
MiniMax-M2.7$0.209$6.27

When the answer is the long part#

Summaries are the easy case: a short answer fits everywhere. Trouble starts when the model has to write a lot. Say you have a 20,000-token manual and you ask for a 6,000-token report based on it. That fits every model (6,000 ≤ 8,192), and the live table shows the cost:

Model Cost OpenRouter
GLM-5.3-Flash $0.00064 $0.0012
DeepSeek-V4-Flash $0.0009 $0.0022
MiniMax-M2.7 $0.0019 $0.0228

20,000 input and 6,000 output tokens in total. Prices per 1M tokens are current and change together with our tariffs; the OpenRouter column shows reference prices for the same workload.

Now ask for a full translation of the same manual. A translation runs about as long as the original, so you need room for around 20,000 tokens of answer. Set max_tokens to 25,000: 20,000 + 25,000 = 45,000, well inside the 380K window, and 25,000 ≤ 32,768, so DeepSeek-V4-Flash takes it in one answer. A single job like that costs $0.0023. For the models with an 8,192-token answer limit, cut the manual into chapters and send them one by one.

Which one for your case#

Pick your case

Pick the model by the shape of your job

A long document, a short answer

A 300K-token archive, a long log, a stack of reports with a summary or a few questions on top: choose GLM-5.3-Flash. It has the widest window, 390K, and an answer of up to 8,192 tokens is plenty for a summary.

A long answer

A full translation, a complete report, a long draft: choose DeepSeek-V4-Flash. It writes up to 32,768 tokens in one answer and still has a 380K window for the source.

A document under about 170K

A contract, a transcript, a mid-size codebase excerpt: MiniMax-M2.7 has a 180K window and up to 8,192 tokens of answer, which is enough for these. Check the live table above for its cost on your numbers.

If you are still unsure, run one real document through the script and read usage. For a broader comparison of the three models by task, see GLM vs DeepSeek vs MiniMax, and the DeepSeek page covers DeepSeek-V4-Flash in more detail.