How to use
- Paste an example of the JSON you want the model to return, for example the object your app expects.
- Turn on Strict for LLM structured outputs: every field becomes required, fields missing from some samples become nullable, and
additionalPropertiesis set tofalse. - Pick an output format: a plain JSON Schema, an OpenAI
response_format, an OpenAI function/tool, or an Anthropic tool withinput_schema. - Copy the result straight into your API call.
FAQ
Why does OpenAI reject my schema with “all fields must be required”?
With strict: true, OpenAI requires every property to appear in required and additionalProperties: false on every object. Optional values must be expressed as a union with null — exactly what Strict mode generates.
Does this work for Claude tool use?
Yes. Choose “Anthropic tool” to get { name, description, input_schema }, the shape the Messages API expects in its tools array.
How are numbers and arrays inferred?
Values become string, number, boolean or null. Arrays merge all their elements, so a key present in only some objects becomes optional (or nullable in Strict mode). Edit the result to add enum, description or integer where you need tighter constraints.