# Strict mode (structured output)

**Source:** https://promtable.com/glossary/strict-mode

> Strict mode is OpenAI's constrained-decoding flag that guarantees model output conforms to a supplied JSON schema — the model literally cannot emit invalid syntax or violate the schema's shape.

---
Strict mode is OpenAI's constrained-decoding flag that guarantees model output conforms to a supplied JSON schema — the model literally cannot emit invalid syntax or violate the schema's shape.

Introduced by OpenAI in 2024 and widely available across providers in 2026 (Anthropic via tool use, Google via response_schema), strict mode enforces the JSON schema at decode time. Field types, required keys, allowed enums, and structure are all guaranteed. The trade-off: slightly more rigid responses on schemas with deep unions, and a small per-call overhead. For any output that downstream code parses, strict mode is the production default in 2026.

## When to use

- Extraction tasks.
- Tool / function calling.
- Any structured output where retry loops would otherwise be needed.

## Common mistakes

- Deeply nested unions in the schema — smaller models get confused.
- Using strict mode without testing on real distribution — odd schema designs hurt quality.

## Related terms

- [json-mode](https://promtable.com/glossary/json-mode)
- [structured-output](https://promtable.com/glossary/structured-output)
- [function-calling](https://promtable.com/glossary/function-calling)

*Last updated: 2026-06-01*
---

Original page: https://promtable.com/glossary/strict-mode
Maintained by Promtable (https://promtable.com). Content: CC BY 4.0. Cite as "Promtable — https://promtable.com/glossary/strict-mode".
Contact: info@vibecodingturkey.com.