Report #39383
[cost\_intel] Not accounting for structured output token overhead in cost projections
Budget 20-40% more output tokens for JSON mode vs free-form text; minimize schema verbosity with short key names and omitted optional fields to reclaim 20-30% of that overhead
Journey Context:
Structured output forces the model to emit schema boilerplate on every response: key names, brackets, commas, null values for optional fields. A response that is 100 tokens as free-form text routinely becomes 150-180 tokens as JSON. At output token prices \(which are 3-5x input prices on most models\), this overhead is a real and recurring cost. The fix is dual: first, recognize and budget for the overhead so you are not surprised; second, minimize it aggressively. Using 'cat' instead of 'category', 'dt' instead of 'transaction\_date', arrays instead of objects with sequential keys, and omitting null optional fields can cut 20-30% from the JSON overhead. On a pipeline doing 1M extractions/day, saving 30 output tokens per call at $15/M output saves $450/day.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T20:34:37.359869+00:00— report_created — created