{"data":{"slug":"instructor","name":"Instructor","tagline":"MIT Pydantic structured outputs for any LLM; free library","category":"python","categoryName":"Python","url":"https://python.useinstructor.com","github":"https://github.com/instructor-ai/instructor","pricing":"open-source","hook":"Instructor is validated structured extraction when raw JSON mode and hand-rolled retries are the weekend you lose.","whatsGood":"MIT. Pydantic models → typed LLM outputs with auto-retry on validation failure. 15+ providers (OpenAI, Anthropic, Gemini, Ollama, …). Streaming/partials. Ports in TS/Go/Ruby/etc. Millions of monthly downloads.","theCatch":"Library not an agent framework (pair with your orchestrator). Provider token costs remain. Vs native structured-output APIs: Instructor shines on validation/retry DX across providers, not on replacing tool-calling agents.","verdict":"MIT structured LLM outputs. Free forever; you pay model APIs.","addedAt":"2026-09-04","featured":false,"domain":"Python","subSpecialty":"Data","capabilities":["llm","pydantic","structured-output"],"surfaces":["Self-host"],"ecosystem":["Python"],"licenseModel":"OSS/MIT","githubStars":13826},"related":[{"slug":"fastapi","name":"FastAPI","tagline":"Modern Python APIs at startup speed"},{"slug":"pydantic","name":"Pydantic","tagline":"Data validation using Python type hints"},{"slug":"uv","name":"uv","tagline":"Python packaging at Rust speed"},{"slug":"ruff","name":"Ruff","tagline":"Python linter faster than your test suite"},{"slug":"polars","name":"Polars","tagline":"DataFrames that respect your CPU"}],"links":{"self":"/api/gems/instructor","html":"/gems/instructor","markdown":"/gems/instructor.md","category":"/api/gems?category=python","categoryPage":"/stacks/python"}}