Structured output
Also called JSON mode, structured outputs, json output
Getting an AI to answer in a fixed format, like JSON or a table, that software or people can use directly.
Structured output means the model's response follows a defined format rather than free-form prose. At the simple end, that is asking for a table, a numbered list or specific headings. At the strict end, it is valid JSON matching a schema, so code can parse it reliably without cleanup.
Most major APIs now offer a structured output or JSON mode. You provide a JSON schema, and the provider constrains generation so the output is guaranteed to match it: every required field present, correct types, nothing extra. This is far more reliable than asking nicely in the prompt, which usually works but occasionally adds a friendly sentence before the JSON or misses a bracket.
For people rather than programs, structure still helps. Tables make comparisons scannable, consistent headings make reports comparable week to week, and fixed fields make outputs easy to paste into spreadsheets. A good format describes what goes in each part, not just its shape: what to write when information is missing, which units to use and how long each field should be.
Example
An invoice processing tool asks for {"vendor": string, "total": number, "due_date": "YYYY-MM-DD", "po_number": string or null}. Using the API's structured output feature, every response parses, and missing purchase order numbers come back as null instead of "N/A" or "unknown".
Common mistake
Treating a valid format as a correct answer. Structured output guarantees the shape, not the truth: a perfectly valid JSON object can still contain a wrong total. Validate important values, and tell the model to use null rather than guessing when information is missing.