Structured output
Get JSON, not paragraphs
What is structured output
Structured output means the model returns data in a predictable, machine-readable format — typically JSON — instead of free-form text. You define the schema. The model fills it.
Here is the difference. Without structured output: "The price is three dollars per million tokens for input and fifteen dollars for output." With structured output: `{"input_price": 3.00, "output_price": 15.00, "currency": "USD", "unit": "per_1m_tokens"}`.
Why it matters
If your application parses model output programmatically — every production application does — structured output eliminates the fragile regex step. OpenAI calls it JSON mode. Anthropic supports it via tool use. The reliability difference is significant: free-form text parsing fails 5–15% of the time in practice. Structured output fails under 0.1%. sourc.dev tracks JSON mode support as a capability flag.
Verified March 2026 · Source: OpenAI JSON mode docs, Anthropic docs