About this tool
Structured outputs let a model return JSON that conforms to a schema you define, instead of free-form text you have to parse and hope for. This builder assembles that schema field by field — names, types, descriptions, required flags, enums and nested objects or arrays — and exports it in the exact shape each provider expects: a raw JSON Schema, OpenAI response_format and function-tool wrappers, Anthropic tool input_schema, Google Gemini responseSchema, plus ready-to-paste Zod and Pydantic definitions.
OpenAI's strict structured-output mode has rules worth knowing: every property must be listed as required and additionalProperties must be false. The builder applies these automatically in the OpenAI exports and flags anything that would violate them, so the schema you copy actually works. Paste an existing JSON sample to infer a starting schema, then refine it.
Schemas are built and exported entirely in your browser — nothing you type is uploaded.
Frequently asked questions
What are structured outputs and tool use?
Both ask a model to return JSON matching a schema. Structured outputs constrain the model's final answer to a shape you define; tool (function) calling describes the arguments a model may produce when it decides to call one of your functions. The underlying schema format is the same.
Why does OpenAI strict mode require every field to be required?
Strict mode guarantees the output validates against your schema with no surprises, and to do that it disallows optional and additional properties. To make a field effectively optional, mark its type as nullable — a union with null — while keeping it in the required list.
What's the difference between the OpenAI, Anthropic and Gemini exports?
The JSON Schema is largely shared, but each provider wraps it differently: OpenAI nests it under response_format or a function tool with strict: true, Anthropic expects it as a tool input_schema, and Gemini uses responseSchema with its own enum of supported types. This tool emits the correct wrapper for each.
Can I generate Zod or Pydantic code?
Yes. Alongside the provider formats, the builder outputs a Zod schema for TypeScript and a Pydantic model for Python so you can validate the response in your own code.