Fan-out looks cheap on a whiteboard: one orchestrator, five subagents, work happens in parallel. On the bill, the same design is a multiplication problem. Every subagent re-sends its system prompt, re-sends its task, and re-reads its own tool output on every turn, and the orchestrator pays again to read what the subagents produced. That is why multi-agent token cost usually lands several times higher than the single-agent design it replaced.
This post works through the arithmetic for a typical coding fan-out, prices it across four catalogue tiers, and shows how to measure the real number instead of estimating it. Nothing below is a quality benchmark, the token counts are illustrative, and the rates are floors from the live catalogue at the time of writing. The method is the part worth keeping.
Why fan-out multiplies before it accelerates
A chat turn does not send a delta. It sends the whole conversation prefix up to that point, so an agent that takes eight turns pays for the first message eight times, the second message seven times, and so on. Cost per turn grows roughly linearly with turn index, and total input grows with the square of the step count. Split the work across five subagents and you multiply that total by five, then add the orchestrator's own turns on top.
Two second-order effects usually explain the gap between your spreadsheet and the invoice. Subagents inherit context they do not need, because passing the transcript is easier than writing a brief. And retried subagents repeat their entire prefix, not just the failed step.
What one subagent actually sends
Take an illustrative research subagent:
- 2,000 tokens of system prompt and task brief
- 8 turns, each appending 1,200 tokens of tool output
- 600 output tokens per turn
Input per turn runs 2,000, 3,200, 4,400, and up to 10,400 on the last turn. Summed, that is 16,000 tokens of base prompt plus 1,200 tokens multiplied by 28, which comes to 49,600 input tokens. Output is 8 x 600 = 4,800.
So one modest subagent sends about 50k input and 5k output. Five of them, plus an orchestrator that spends roughly 12,000 input and 3,000 output writing briefs and merging results, lands at about 260,000 input and 27,000 output tokens per fan-out.
Illustrative cost per fan-out
The rates below are the catalogue's from-prices, per million input and output tokens. A from-price is a floor: the offer that serves your request can be priced above it, and the bill uses that offer's rates, so read these as best-case tiers rather than a forecast.
| Model ID | From, input / output per Mtok | Cost per fan-out | 2,400 fan-outs / month | |---|---|---|---| | mm/MiniMax-M3 | $0.00075 / $0.003 | ~$0.0003 | ~$0.66 | | zai/glm-5.3 | $0.0035 / $0.011 | ~$0.0012 | ~$2.90 | | cc/claude-sonnet-5 | $0.37 / $1.85 | ~$0.15 | ~$350 | | oai/gpt-6-astra | $5.75 / $28.75 | ~$2.27 | ~$5,450 |
The monthly column assumes three developers running 40 fan-outs a day over 20 working days. The spread between the top and bottom row is about four orders of magnitude on identical token counts. That is the actual lesson for leaf work: routing decides the bill far more than prompt craft does.
Output tokens are only about 10% of the count, but they are roughly a third of the bill on the mid and high tiers, because output is priced about five times input on models such as cc/claude-sonnet-5 and oai/gpt-6-astra. Cached input helps there: on AtmoRouter, cached input is billed at 10% of the input rate where supported, which is usually the only lever that makes repeated prefixes affordable. The table above ignores caching, so treat it as a ceiling for those rates. One more floor applies in the other direction: AtmoRouter charges a small per-request minimum, and a fan-out is dozens of requests, so on the cheapest tiers the minimum can outweigh the token math. Check the current minimum_charge in the Budgets docs before trusting sub-cent estimates.
The multiplier that matters: inherited context
The single largest swing in the numbers is what each subagent inherits. If the orchestrator passes its own working transcript — say 30,000 tokens — instead of a 2,000-token brief, per-subagent input becomes 8 x 30,000 plus the same 33,600 tokens of accumulated tool output, or 273,600 tokens. Five subagents at that rate send 1.368M input tokens instead of 248k, a 5.5x jump, and total fan-out cost on cc/claude-sonnet-5 nearly quadruples, from about $0.15 to $0.56.
The same effect shows up at the merge step. A subagent that returns a 4,000-token report instead of a 400-token structured summary leaves those tokens in the orchestrator's context for every later turn, and the orchestrator usually runs on the pricier model because it makes the decisions.
Measure the second fan-out, not the first
Cost math is a planning tool; instrumentation is the control. OpenAI-protocol responses return prompt_tokens, completion_tokens and prompt_tokens_details.cached_tokens, so any request can be priced exactly once you know the rates it was served at. Rates in the snippet are per million tokens, from the model page.
pythonfrom decimal import Decimal
IN_RATE = Decimal("0.37") # from $0.37 input
OUT_RATE = Decimal("1.85") # from $1.85 output
CACHED = Decimal("0.10") # cached input billed at 10% of the input rate
def cost(usage: dict) -> Decimal:
prompt = usage.get("prompt_tokens", 0)
details = usage.get("prompt_tokens_details") or {}
cached = details.get("cached_tokens", 0)
fresh = max(prompt - cached, 0)
return (
Decimal(fresh) * IN_RATE
+ Decimal(cached) * IN_RATE * CACHED
+ Decimal(usage.get("completion_tokens", 0)) * OUT_RATE
) / Decimal(1_000_000)
per_fanout = ( # subagent_responses / orchestrator_response: raw JSON bodies you logged
sum(cost(r["usage"]) for r in subagent_responses)
+ cost(orchestrator_response["usage"])
)
print(f"{per_fanout:.4f} USD")Tag each subagent's usage with its task name before summing. An unlabelled aggregate hides the one subagent that re-reads a 40k-token file on every turn, which is exactly the node worth fixing.
Streaming needs one flag to give you the same numbers:
pythonimport os
from openai import OpenAI
client = OpenAI(
base_url="https://atmorouter.dev/v1",
api_key=os.environ["ATMOROUTER_API_KEY"],
)
stream = client.chat.completions.create(
model="zai/glm-5.3",
messages=[{"role": "user", "content": "List the endpoints in server.py."}],
stream=True,
stream_options={"include_usage": True},
)With stream_options.include_usage the usage block arrives in the final chunk; if the stream is interrupted, that last chunk may never arrive, so log what you received rather than assuming completeness. Two protocol notes: the OpenAI-compatible endpoint lives at https://atmorouter.dev/v1 and the Anthropic Messages protocol at https://atmorouter.dev, so the same instrumentation works for either client. And failed requests are never billed, which means a retry storm costs you the successful attempt plus the latency, not the failures.
Where fan-out pays off
Fan-out is worth its multiplier when subtasks are independent, when each subagent reads a different slice of the repository, and when wall-clock time matters more than tokens. It is a poor fit when every subagent needs the same large context, when reports must be merged into one long document, or when the task is small enough that a single agent finishes in six turns.
Rules that hold up in practice:
- 1.Brief, don't inherit. Write a task spec per subagent instead of passing the transcript.
- 2.Cap tool output at the source. Twenty lines of grep results beat a full file dump.
- 3.Return structured summaries, not prose, so the merge turn stays short.
- 4.Keep nesting to one level. Depth adds orchestration overhead without adding information.
- 5.Route leaves down. Summarising, extracting and drafting rarely need the top tier.
None of that removes the parallel bonus. It removes the tokens that buy nothing.
FAQ
Why is multi-agent token cost so much higher than a single agent?
Each subagent re-sends its own system prompt, brief and accumulated tool output on every turn, and the orchestrator pays again to read the results. In the example above that adds up to about 260,000 input tokens per five-subagent fan-out.
Does prompt caching reduce fan-out cost?
Yes, where the model supports it. On AtmoRouter, cached input on cache-capable models is billed at 10% of the input rate, so stable shared prefixes such as system prompts get much cheaper.
Am I billed for failed or interrupted subagent calls?
Failed requests are not billed on AtmoRouter. An interrupted stream is charged only from valid reported usage, so check your usage log before retrying.
Which model should subagents use?
Use the cheapest tier that passes your quality bar for leaf tasks like extraction and summarising, and keep the pricier model for the orchestrator's decisions.
Next step
Start from the live model list, pick the cheapest tier that clears your quality bar for leaf work, and instrument one fan-out before you scale it to ten. If the numbers surprise you, the retry and fallback patterns post explains the failure-cost side, and prompt caching for AI agents covers the other lever on repeated prefixes. Ready to try it? Create an AtmoRouter key and point your agent framework at https://atmorouter.dev/v1.