Insight

LLM Summarization Cost per Document: One-Shot vs Map-Reduce Math

LLM summarization cost per document, worked out: one-shot long-context calls vs chunked map-reduce vs a two-model split, with live AtmoRouter model prices.

Summarization pipelines look cheap per call and then surprise teams on the invoice, because the bill depends less on the model's headline price than on how many times each document crosses the API. This post walks through the LLM summarization cost per document for three designs: one call per document, chunked map-reduce, and a split where a cheap model reads the chunks and a stronger model writes the final summary.

Every number is illustrative arithmetic built on the public AtmoRouter model list at writing time. It is not a benchmark. Treat the method as the takeaway and rerun the math with your own usage data.

What you pay for in a summarization pipeline

Each call to a chat model is billed on two quantities: input tokens (instructions plus the text you want summarized) and output tokens (the summary itself). Three things push those quantities up in practice:

  1. 1.Instruction overhead. A prompt template, rubric or house-style guide is resent with every call. A 150-token instruction is noise on a 40,000-token document and a major cost driver when you summarize 400-token support tickets.
  2. 2.Intermediate outputs. Map-reduce designs ask the model to write per-chunk summaries that are then fed back in as input. Those tokens are billed twice: once as output, once as input.
  3. 3.Verbosity settings. Output tokens usually cost several times more than input tokens on the same model, so a loose "summarize this" prompt that yields 600 tokens instead of 200 is more expensive than it looks.

A useful habit is to record usage.prompt_tokens and usage.completion_tokens from every response and multiply by the model's rates yourself, instead of trusting a mental estimate. The code at the end of this post does exactly that.

Per-document cost at a glance

Assume 1,000 documents of 4,000 tokens each, a 300-token instruction and a 200-token summary. That is 4.3M input tokens and 0.2M output tokens for the batch. Rates below are the public "from" prices on AtmoRouter per million input/output tokens at the time of writing; they refresh regularly and the model page is authoritative.

| Model | From price (in / out per 1M) | Batch of 1,000 docs | Per document | |---|---|---|---| | mm/MiniMax-M3 | $0.00075 / $0.003 | ~$0.0038 | ~$0.0000038 | | zai/glm-5.4 | $0.0035 / $0.011 | ~$0.017 | ~$0.000017 | | alicn/deepseek-v4.1-flash | $0.0375 / $0.15 | ~$0.19 | ~$0.00019 | | cc/claude-sonnet-5-5 | $0.50 / $2.50 | ~$2.65 | ~$0.0027 | | cx/gpt-6.2-sol | $0.695 / $3.475 | ~$3.68 | ~$0.0037 |

The spread between the cheapest and the most expensive row is roughly three orders of magnitude. That is the real decision in a summarization project: quality requirements, not per-token price, decide which row you can use. Before extrapolating the smallest figures to tiny volumes, check the pricing page for any per-request minimum, which can dominate sub-cent requests.

Long context one-shot vs chunked map-reduce

When documents are long, say 40,000 tokens each, you have two options. Send the whole document in one call, or split it into 4,000-token chunks, summarize each chunk (map), then combine the chunk summaries into a final summary (reduce).

Compare the two on 100 such documents with a 150-token instruction:

  • One-shot: 100 calls. Input 100 x 40,150 = 4.015M tokens; output 100 x 400 = 0.04M tokens.
  • Map-reduce: 1,000 map calls (input 4,150 each, output 250 each) plus 100 reduce calls (input 2,500 each, output 300 each). Input 4.15M + 0.25M = 4.40M tokens; output 0.25M + 0.03M = 0.28M tokens.

| Model | One-shot | Map-reduce | Difference | |---|---|---|---| | zai/glm-5.4 | ~$0.014 | ~$0.018 | +28% | | alicn/deepseek-v4.1-flash | ~$0.157 | ~$0.207 | +32% | | cc/claude-sonnet-5-5 | ~$2.11 | ~$2.90 | +38% | | cx/gpt-6.2-sol | ~$2.93 | ~$4.03 | +38% |

The honest conclusion: map-reduce does not save money on input. It reads the same text and adds intermediate outputs, so it costs 28-38% more in this scenario. What it buys is parallelism (ten chunks can run concurrently), lower latency, and a fallback for documents that exceed a model's context or output limits. Choose it for those reasons, not for the bill.

Prompt caching narrows the gap only when the repeated prefix is large. On AtmoRouter, cached input bills at 10% of the input rate where supported, so a long, identical instruction or rubric benefits; the document text itself, which changes every call, does not.

Split the work across two models

The biggest lever is not how you chunk but who does each stage. Map calls are mechanical: read a chunk, extract the key points. Reduce calls need judgment: reconcile, prioritize, write prose. Many teams can run the map stage on a cheap fast model and reserve a frontier model for the reduce stage.

Using alicn/deepseek-v4.1-flash for the 1,000 map calls (4.15M in, 0.25M out) and cc/claude-sonnet-5-5 for the 100 reduce calls (0.25M in, 0.03M out):

  • Map: 4.15 x $0.0375 + 0.25 x $0.15 = ~$0.19
  • Reduce: 0.25 x $0.50 + 0.03 x $2.50 = ~$0.20
  • Total: ~$0.39, against ~$2.90 for map-reduce entirely on Sonnet. About 86% less.

Illustrative again, and conditional on the cheaper model's chunk summaries being good enough for your content. Run a sample of 50 documents through both designs and compare the final summaries before committing. If quality drops, the saving is imaginary.

Code: map-reduce with usage tracking

This script splits a document into token-sized chunks, maps with one model, reduces with another, and prints the tokens each stage consumed. Token counting here is approximate (word-based) so the example has no dependencies beyond the OpenAI SDK; for billing-grade estimates, use a real tokenizer for the model in question.

pythonimport os
from concurrent.futures import ThreadPoolExecutor
from openai import OpenAI

client = OpenAI(
    base_url="https://atmorouter.dev/v1",
    api_key=os.environ["ATMOROUTER_API_KEY"],
)

MAP_MODEL = "alicn/deepseek-v4.1-flash"
REDUCE_MODEL = "cc/claude-sonnet-5-5"
CHUNK_WORDS = 3000  # roughly 4k tokens for English prose
RATES = {  # USD per 1M tokens (input, output), from the public model list
    MAP_MODEL: (0.0375, 0.15),
    REDUCE_MODEL: (0.50, 2.50),
}

def call(model, system, user):
    r = client.chat.completions.create(
        model=model,
        messages=[{"role": "system", "content": system},
                  {"role": "user", "content": user}],
    )
    usage = (r.usage.prompt_tokens, r.usage.completion_tokens)
    return r.choices[0].message.content, (model, *usage)

def chunks(text, size):
    words = text.split()
    return [" ".join(words[i:i + size]) for i in range(0, len(words), size)]

def summarize(document):
    parts = chunks(document, CHUNK_WORDS)
    ledger = []
    with ThreadPoolExecutor(max_workers=8) as pool:
        futures = [
            pool.submit(call, MAP_MODEL,
                        "Extract the key points of this text in at most 250 tokens.",
                        p)
            for p in parts
        ]
        notes = []
        for f in futures:
            text, usage = f.result()
            notes.append(text)
            ledger.append(usage)
    digest = "\n\n".join(notes)
    final, usage = call(
        REDUCE_MODEL,
        "Write a faithful 300-token summary from these notes. Do not add facts.",
        digest,
    )
    ledger.append(usage)
    return final, ledger

def cost(ledger):
    total = 0.0
    for model, p_in, p_out in ledger:
        r_in, r_out = RATES[model]
        total += p_in / 1e6 * r_in + p_out / 1e6 * r_out
    return total

if __name__ == "__main__":
    doc = open("report.txt", encoding="utf-8").read()
    summary, ledger = summarize(doc)
    print(f"calls: {len(ledger)}, estimated cost: ${cost(ledger):.5f}")
    print(summary)

Two details matter. A hard cap in the map instruction ("at most 250 tokens") keeps intermediate output, and therefore the reduce stage's input, bounded. And keeping the ledger per model means you can swap either model and see the cost move without guessing.

FAQ

Is one-shot always cheaper, then?

On input tokens, usually yes for documents that fit in the model's context. The exception is when the model drops detail from long inputs and you have to rerun; rework often costs more than chunking overhead.

Does streaming lower the bill?

No. Streaming changes latency, not price. If you stream, set stream_options={"include_usage": True} on Chat Completions so the final chunk carries the usage block, and note that an interrupted stream may never deliver it.

Where do I check current rates?

The pricing page and GET https://atmorouter.dev/v1/models list live prices. The figures in this post are a snapshot.

Next step

Pull prompt_tokens and completion_tokens from your last 100 summarization calls, plug them into the tables above, and you will have a realistic cost per document in under ten minutes. If you want a deeper treatment of the token-counting side, see our post on counting tokens before the API call; for keeping repeated prefixes cheap, see the guide to prompt caching for AI agents. When you are ready to run the numbers on real traffic, grab a key at atmorouter.dev and point the script above at your own documents.

Older

Claude Sonnet 5.5 vs GPT-6.2 Sol: Live Prices, Context and Cost Math

Build with AtmoRouter.