Skip to content
Everything *[NYC] 2026: see what we announced. →

Structured output definition

Structured output is the practice of constraining a language model so its response conforms to a predefined schema, usually JSON Schema, instead of free-form prose. Rather than asking the model to reply in JSON and hoping, the serving layer restricts what tokens it may emit at each step, so the finished response parses and validates against the shape the calling program expects.


A diagram explaining Structured output in terms of related concepts.

How does structured output actually work?

What is the difference between structured output and JSON mode?

Why not just ask the model nicely, or validate afterwards?

Does forcing a schema make the model worse at reasoning?

How does structured output relate to structured content?

Explore Sanity Today

Understanding structured output is just the beginning. Take the next step and discover how Sanity can enhance your content management and delivery.

Last updated: