# JSON Schema mode (strict)

**Source:** https://promtable.com/glossary/json-schema-mode

> JSON Schema mode is the API feature — OpenAI strict mode, Anthropic tool-use schemas, Gemini response_schema — that constrains a language model's output to match a supplied JSON Schema at decode time.

---
JSON Schema mode is the API feature — OpenAI strict mode, Anthropic tool-use schemas, Gemini response_schema — that constrains a language model's output to match a supplied JSON Schema at decode time.

Standard JSON mode forces valid syntax but allows the model to invent fields. JSON Schema mode (strict) additionally enforces the field shape: required keys, field types, allowed enums, nested object structure. The decoder cannot emit output that violates the schema. Production LLM apps in 2026 default to JSON Schema mode for any output downstream code parses — extraction, classification, tool-call arguments. Trade-off: deep unions or recursive schemas can confuse smaller models; keep schemas reasonably flat.

## When to use

- Production extraction tasks.
- Tool / function call arguments.
- Anywhere code downstream parses the model's output.

## Common mistakes

- Deeply nested optional fields — smaller models drift on shape.
- Skipping schema validation server-side — strict mode reduces but does not eliminate edge-case failures.

## Related terms

- [json-mode](https://promtable.com/glossary/json-mode)
- [strict-mode](https://promtable.com/glossary/strict-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/json-schema-mode
Maintained by Promtable (https://promtable.com). Content: CC BY 4.0. Cite as "Promtable — https://promtable.com/glossary/json-schema-mode".
Contact: info@vibecodingturkey.com.