Skip to main content
Structured output lets you define a Pydantic model and have the LLM return data that conforms exactly to that schema.

With Agents

Pass output_schema to an agent run:
Use output_schema=, not response_model=. The response_model parameter does not exist.

With Models

Pass response_format to a model call:

Complex Schemas

Nested models, lists, enums, and optional fields are all supported:

Provider Support

When a provider does not support native structured outputs, Definable automatically includes the JSON Schema in the system prompt and instructs the model to respond in the correct format.