VynarisEarly betaGet your API key

The real price of structured output: JSON mode and tool-call token overhead, measured

Tools add a fixed token tax before your prompt: 67 to 77% of a small structured call. Per-model math plus the caching fix. Verified 2026-07-19.

Turn on tools and Claude adds a fixed block of input tokens before it reads a word of your prompt. On Claude Opus 4.8, forcing a tool call adds 410 tokens of tool-use system prompt; a 200-token schema pushes the fixed overhead to 610. On a small extraction call of 300 input and 15 output tokens, that overhead is 67% of the input bill. Prices and token counts verified 2026-07-19. Here is when the tax dominates a cheap-model bill and when it is noise.

TL;DR

What we computed, and why

Structured output feels free. You add a tools array or a JSON schema, the model returns clean fields, and nothing on the invoice says "structured output." The cost is real; it is just filed under input tokens. Every tool-enabled request carries a tool-use system prompt the API injects for you, plus the tokens of your schema, plus per-request tool_use and tool_result blocks. None of it is your content, and all of it bills at the input rate on every call.

Anthropic is the one major provider that prints the fixed part as an exact per-model number, so we can quantify it from public docs instead of guessing. We take those published counts, apply live 2026-07-19 prices, and find the workload shape where the tax stops being a rounding error and becomes the bill.

Every figure below comes from a script; nothing was computed by hand.

The published receipts (verified 2026-07-19)

These are Anthropic's stated token counts for enabling tools. The tool-use system prompt is added whenever at least one tool is present; the count depends on tool_choice.

Model                                                            Tool system prompt (auto)  Tool system prompt (forced)
---------------------------------------------------------------  -------------------------  ---------------------------
[Claude Opus 4.8](https://vynaris.com/models#claude-opus-4-8)    290                        410
[Claude Sonnet 5](https://vynaris.com/models#claude-sonnet-5)    354                        474
[Claude Haiku 4.5](https://vynaris.com/models#claude-haiku-4-5)  496                        588
[Claude Opus 4.7](https://vynaris.com/models#claude-opus-4-7)    675                        804

Named tools cost extra on top, also published: the bash tool adds 325 tokens on Opus 4.7 and 4.8 (244 on Sonnet 4.6 and earlier), and the text_editor_20250429 tool adds 700 tokens on Claude 4.x. These are fixed per request, independent of what the tool does. Your own custom tool adds its schema tokens, which you must measure with the count-tokens endpoint; we use 200 tokens as an editable placeholder.

The load-bearing detail: the tool-use system prompt does not scale with a bigger cheaper model discount. Haiku 4.5, the model you reach for precisely because it is cheap at high volume, carries a 588-token forced-tool system prompt against Opus 4.8's 410. The cheap model pays 43% more fixed tokens per call than the flagship.

The assumptions (edit these)

A high-volume structured-extraction call: classify or extract a small record, return a compact JSON object, forced tool call so the model must emit the structure.

Assumption          Value              Note
------------------  -----------------  --------------------------------------------
Content input       300 tokens         the actual text to classify or extract
Output tokens       15                 a small structured JSON result
Custom tool schema  200 tokens         workload-specific; measure with count-tokens
Tool choice         forced (any/tool)  the model must call the tool
Volume basis        1,000,000 calls    high-throughput pipeline

Results: the tax before your prompt

For each model, the fixed tool tax is the tool-use system prompt plus the 200-token schema. Content input is 300 tokens.

Model             Fixed tax  Total input  Tax as % of input
----------------  ---------  -----------  -----------------
Claude Opus 4.8   610        910          67%
Claude Sonnet 5   674        974          69%
Claude Haiku 4.5  788        1,088        72%
Claude Opus 4.7   1,004      1,304        77%
Horizontal stacked bars per model showing the fixed tool tax as the majority of a small structured call's input, 67 to 77 percent, with the 300-token content as the minority slice
Fixed tool tax (tool-use system prompt + 200-token schema) vs 300-token content, forced tool call. Published token counts, prices verified 2026-07-19.

Now the money, per million calls, uncached, at live 2026-07-19 prices.

Model             Input $  Output $  Total $  Tax $   Tax as % of bill
----------------  -------  --------  -------  ------  ----------------
Claude Opus 4.8   $4,550   $375      $4,925   $3,050  62%
Claude Sonnet 5   $1,948   $150      $2,098   $1,348  64%
Claude Haiku 4.5  $1,088   $75       $1,163   $788    68%
Claude Opus 4.7   $6,520   $375      $6,895   $5,020  73%

On Haiku 4.5, $788 of every $1,163 per million calls buys no content. It is the toll for structure. Switch to a cheaper model to save money and you carry the toll with you: the fixed tax is a larger share of the smaller bill, not a smaller one.

If you run structured calls at this volume, put your own schema size and call count through the calculator before you assume the model price is what you are paying for.

When the tax is noise

The tax bites small-output, high-volume calls. It disappears on reasoning-heavy ones. Take the same Opus 4.8 forced-tool call and grow it to 4,000 input and 2,000 output tokens.

Call shape            Fixed tax  Tax as % of bill
--------------------  ---------  -------------------------
300 in / 15 out       610 tok    67% of input, 62% of bill
4,000 in / 2,000 out  610 tok    4.2% of bill

Same 610-token tax, two verdicts. On a classification call it is the bill. On a long generation it rounds to nothing. The rule: the tool tax matters in inverse proportion to your output. High call volume with tiny outputs is the danger zone, which is exactly where teams deploy structured output to squeeze cost. The reasoning-token bill is the opposite failure mode, where invisible output tokens dominate; structured output is invisible input.

The fix: cache the tool prefix

The tool-use system prompt, the named-tool definitions, and your schema are identical on every call. That is a stable prefix, and stable prefixes belong in the cache. Anthropic reads cache hits at 0.1x the input rate (verified 2026-07-19), so a 610-token prefix served from cache bills like 61 tokens.

Model             Uncached $/1M calls  Tool prefix cached $/1M calls  Saved
----------------  -------------------  -----------------------------  -----
Claude Opus 4.8   $4,925               $2,180                         56%
Claude Sonnet 5   $2,098               $885                           58%
Claude Haiku 4.5  $1,163               $454                           61%
Claude Opus 4.7   $6,895               $2,377                         66%

Caching does not shrink the tool-use system prompt; it re-prices it. The break-even hit rate for caching is low here because the prefix is served on almost every call in a high-volume pipeline, so the 1.25x write premium is paid once and amortized across millions of reads. This is the same prefix-caching lever that dominates what a coding agent costs per task; a classification pipeline is just the extreme version, where the prefix is most of the request.

What it means for routing

Where this model is wrong

Honesty first, because a cost model that hides its failure modes is marketing.

When is the tax worth paying without a second thought? When your output is large, when you need guaranteed-valid structure a prompt cannot promise, or when call volume is low. The tax is a fixed cost; amortize it over enough output or few enough calls and it stops mattering. It only hurts the high-volume, tiny-output shape, and there the fix is caching, not a cheaper model.

FAQ

How many tokens does turning on tools add? On Claude Opus 4.8, a forced tool call adds a 410-token tool-use system prompt (290 with auto), plus your schema, plus any named-tool definitions such as bash (325) or text_editor (700). Verified 2026-07-19 from Anthropic's pricing page.

Does JSON mode or structured output cost extra? The output itself bills at the normal output rate, but the tool or schema that enforces the structure adds fixed input tokens on every call. On a 300-in, 15-out call with a 200-token schema, that overhead is 62% to 73% of the bill depending on the model.

Why is the overhead worse on a cheaper model? The tool-use system prompt does not shrink with price. Haiku 4.5's forced-tool system prompt is 588 tokens, 43% more than Opus 4.8's 410. On a small call the fixed tax is a larger share of the cheaper model's smaller bill.

How do I reduce structured-output cost? Cache the tool prefix; it is identical on every call and reads at 0.1x, cutting the bill 56% to 61%. Prefer auto tool choice over forced when correctness allows, and keep schemas tight.

Sources

Prices change. We re-verify every figure in this post monthly and stamp updates. Numbers here are current as of 2026-07-19.

Want the same math on your own workload? Vynaris is an OpenAI-compatible gateway that routes each request to the cheapest right-sized model and shows the per-request cost, including the fixed tool overhead you pay before your prompt is read. One base URL swap. Get an API key at vynaris.com.