# What are structured outputs?

Structured outputs constrain a model to emit valid JSON matching a schema you provide, instead of free text that your code must parse and hope over. The decoder only samples tokens that keep the output schema-valid, so downstream systems receive data they can trust mechanically.

This closes the gap between language models and software: extraction pipelines, form fillers, and agents all need fields, not prose. Schema-constrained decoding removes the retry-and-parse loop that unreliable JSON used to require.

The practical guidance is to keep schemas shallow and required fields few; deeply nested optional structures push models toward degenerate completions. Validate with real traffic before trusting any schema at volume.

## Related terms

- [OpenAI-compatible API](https://allocate.network/glossary/openai-compatible-api.md)
- [Function calling](https://allocate.network/glossary/function-calling.md)
- [Tool use](https://allocate.network/glossary/tool-use.md)

---

[HTML page](https://allocate.network/glossary/structured-outputs) · [Machine-readable catalog](https://allocate.network/catalog.json)
