Instructor
Open SourceFrameworks & SDKs
Structured, validated outputs from any LLM.
What it’s for
Instructor patches popular model clients so calls return typed objects — Pydantic models or Zod schemas — instead of raw JSON strings, with automatic retries when validation fails. It removes most of the pain of getting reliable structured output.
How to use it
pip install instructor, wrap your client, then pass response_model=YourPydanticClass to completion calls. Works with OpenAI, Anthropic, Gemini and open models via LiteLLM.
Pricing
Free and open source (MIT).