EN
Sign in Publish

What is an output schema?

What is it?

An output schema is a JSON Schema describing exactly the shape of the expected answer: which fields, which types, which are required. Recent models can follow it (structured outputs).

When to use it

  • Extract data from text (invoice, CV, email) in a reliable format.
  • Plug a model's answer straight into a program.

Page fields

JSON SchemaThe schema, of type object.
InstructionsWhat the model should do with the text.
ExampleA valid output.

How to use it

The Python example passes the schema to the Anthropic API; the OpenAI format is provided too.

Browse Output schemas →