Structured output
Last verified
Structured output constrains generation to a schema so the response is guaranteed-valid JSON.
Its cost benefit is indirect but real: it removes the retry loop. Code that parses a response and retries on failure is a classic runaway loop — a _successful but unparseable_ response is not an exception, so a naive retry can run indefinitely against a model that keeps producing something almost-right.
Every one of those attempts is billed.