Strictly StructuredBeta

Validate, auto-fix & optimize structured output schemas for any LLM

Explore Models

JSON Schema support across LLM structured output providers. Each rule set shares identical schema semantics — models within a rule set differ only in performance and pricing.

Back to Playground

Quick Comparison

FeatureGPT (4+, o1+)Claude (4.5+)Gemini (2.5+)
Root typeobjectobjectobject | array
All fields requiredmandatoryoptionaloptional
additionalProperties: falsemandatoryrecommendedoptional
anyOf
allOf / oneOf / not
$ref / $defs✓ ($ref)
Recursive schemas✓ (depth limited)
pattern (string)✓ *
format (string)✓ * (8)✓ (3)
minimum / maximum✓ *
exclusiveMin / Max✓ *
multipleOf✓ *
minItems / maxItems✓ *
prefixItems
title field
Refusal handling
SDK auto-transforms
Max properties5,000~~
Max nesting10~~
Unknown keywords400 errorSDK handlesignored
= supported = unsupported~ = limited* = not on fine-tuned
GPT (4+, o1+)
GPT (4+, o1+)
All OpenAI models with strict:true structured outputs via response_format or tool calling. Uses constrained decoding (CFG-based) to guarantee 100% schema compliance. All models share identical schema semantics.
gpt-4.1, gpt-4o, gpt-5, gpt-5.1, gpt-5.2, o1, o3, o3-pro, o4-mini
Constraints
Root type must be object
The top-level schema type must be "object". Arrays, strings, or other types cannot be root.
Root-level anyOf is NOT allowed
The root object itself cannot use anyOf. anyOf is only allowed on nested properties.
All properties must be listed in required
Every property defined in "properties" must appear in the "required" array. Optional fields must use nullable type instead: {"type": ["string", "null"]}.
additionalProperties must be false
Every object in the schema (root and nested) must have "additionalProperties": false.
Key ordering is preserved
Output keys match the order defined in the schema's "properties" object.
Limits
Max Properties5000
Max Nesting Depth10
Max String Length Names Enums120000
Max Enum Values1000
Max Enum String Length Over250 Values15000
Supported Keywords
string
enumconstdescriptionpatternformat
pattern and format are NOT supported on fine-tuned models.
number
constdescriptionmultipleOfminimummaximumexclusiveMinimumexclusiveMaximum
Numeric constraints NOT supported on fine-tuned models.
integer
constdescriptionmultipleOfminimummaximumexclusiveMinimumexclusiveMaximum
Same constraint restrictions as number for fine-tuned models.
boolean
constdescription
object
propertiesrequiredadditionalPropertiesdescription
additionalProperties MUST be false. All properties MUST be in required.
array
itemsdescriptionminItemsmaxItems
minItems/maxItems NOT supported on fine-tuned models.
null
Used in type arrays for nullable: {"type": ["string", "null"]}
Unsupported Keywords
string
minLengthmaxLength
object
patternPropertiesunevaluatedPropertiespropertyNamesminPropertiesmaxProperties
array
unevaluatedItemscontainsminContainsmaxContainsuniqueItemsprefixItems
Behaviors
?Refusal Handling
?Schema Caching
Streaming
Citations Compatible
Unknown kw → Returns 400 error
Claude (4.5+)
Claude (4.5+)
Claude models with native structured output via constrained decoding. More lenient than OpenAI: fields don't all need to be required, additionalProperties:false is recommended but not mandatory. SDK auto-transforms unsupported keywords into description hints.
claude-sonnet-4.5, claude-opus-4.5, claude-opus-4.6, claude-haiku-4.5
Constraints
Root type must be object
The top-level schema type must be "object".
additionalProperties: false is recommended
Not mandatory (unlike OpenAI), but strongly recommended for reliable results. SDK auto-adds it.
Fields do NOT all need to be required
Unlike OpenAI, optional fields are natively supported. Omit from "required" array.
Key ordering is preserved
Output keys match the order defined in the schema.
Limits
Max Properties
Max Nesting Depth
Recursive Depthlimited
Supported Keywords
string
enumconstdescription
No pattern, format, minLength, maxLength support. SDK moves unsupported constraints to description.
number
constdescription
No minimum, maximum, multipleOf, exclusiveMin/Max. SDK moves constraints to description.
integer
constdescription
Same limitations as number.
boolean
constdescription
object
propertiesrequiredadditionalPropertiesdescription
array
itemsdescription
No minItems, maxItems. SDK moves to description.
null
const
Used in type arrays for nullable: {"type": ["string", "null"]}
Unsupported Keywords
string
minLengthmaxLengthpatternformat
number
minimummaximummultipleOfexclusiveMinimumexclusiveMaximum
integer
minimummaximummultipleOfexclusiveMinimumexclusiveMaximum
object
patternPropertiesunevaluatedPropertiespropertyNamesminPropertiesmaxProperties
array
minItemsmaxItemsprefixItemsuniqueItemsunevaluatedItemscontains
Behaviors
?Refusal Handling
?Schema Caching
?First Request Latency
Streaming
Citations Compatible
Message Prefilling Compatible
?Sdk Auto Transforms
Unknown kw → SDK handles; raw API may error on invalid schemas
Gemini (2.5+)
Gemini (2.5+)
Gemini 2.5+ models using responseJsonSchema field for standard JSON Schema. Most permissive: root can be object or array, fields can be optional, supports min/max on numbers, prefixItems for tuples, title field. Gemini 3 preview models additionally support combining structured outputs with built-in tools (Google Search, URL Context, Code Execution).
gemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-lite, gemini-3-pro-preview, gemini-3-flash-preview
Constraints
Root type can be object OR array
Unlike OpenAI and Anthropic, Gemini allows array as root type.
Fields do NOT all need to be required
Optional fields are natively supported.
additionalProperties is optional
Supported but not required. Can be boolean or schema.
Key ordering matches schema
Gemini 2.5+ preserves property order from schema. For Gemini 2.0, use propertyOrdering field explicitly.
Limits
Max Properties
Max Nesting Depth
Supported Keywords
string
enumformatdescriptiontitle
No pattern, minLength, maxLength support.
number
enumminimummaximumdescriptiontitle
No multipleOf, exclusiveMinimum, exclusiveMaximum.
integer
enumminimummaximumdescriptiontitle
Same as number.
boolean
descriptiontitle
object
propertiesrequiredadditionalPropertiesdescriptiontitle
additionalProperties can be boolean or schema.
array
itemsprefixItemsminItemsmaxItemsdescriptiontitle
prefixItems enables tuple-like structures.
null
Used in type arrays for nullable: {"type": ["string", "null"]}
Unsupported Keywords
string
minLengthmaxLengthpattern
number
multipleOfexclusiveMinimumexclusiveMaximum
integer
multipleOfexclusiveMinimumexclusiveMaximum
object
patternPropertiesunevaluatedProperties
array
uniqueItemscontains
Behaviors
?Refusal Handling
?Schema Caching
Streaming
Citations Compatible
?Tools Combinable
Unknown kw → Silently ignored
Universal Rules — All Providers
Always Supported
stringnumberintegerbooleanobjectarraynullanyOf$refenumdescriptionpropertiesrequiredadditionalPropertiesitemsnullable via ["T","null"]recursive schemasstreaming
Never Supported
allOfoneOfnotif/then/elseminLengthmaxLengthpatternPropertiesunevaluatedPropertiesuniqueItemscontains
Last verified: 2026-02-14 · Sources: OpenAI, Anthropic, Googleofficial documentation