Supported draft version
Model Inference supports JSON Schema Draft 2020-12 features commonly used for structured output definition.Basic types
String
Number
Integer
Boolean
Null
Object type
Define structured objects with named properties:Required properties
Use therequired array to specify mandatory fields:
Additional properties
Control whether extra properties are allowed:Array type
Simple arrays
Array constraints
Arrays of objects
Enum constraint
Restrict values to a predefined set:Numeric constraints
| Keyword | Description |
|---|---|
minimum | Value must be >= this number |
maximum | Value must be <= this number |
exclusiveMinimum | Value must be > this number |
exclusiveMaximum | Value must be < this number |
multipleOf | Value must be divisible by this number |
String constraints
| Keyword | Description |
|---|---|
minLength | Minimum string length |
maxLength | Maximum string length |
pattern | Regex pattern the string must match |
Array constraints
| Keyword | Description |
|---|---|
minItems | Minimum array length |
maxItems | Maximum array length |
uniqueItems | All items must be unique |
Descriptions
Add descriptions to help the model understand field purpose:Nested structures
Nested objects
Common patterns
Classification result
Entity extraction
Summary with key points
CRON expression result
TypeScript mapping
| JSON Schema Type | TypeScript Type |
|---|---|
string | string |
number | number |
integer | number |
boolean | boolean |
null | null |
array | T[] |
object | { [key: string]: T } |
enum | Union type ('a' | 'b' | 'c') |

