# Instructor
> A lightweight library for structured outputs with LLMs.
Instructor is a Python library that makes it easy to work with structured outputs from large language models (LLMs). Built on top of Pydantic, it provides a simple, type-safe way to extract structured data from LLM responses across multiple providers including OpenAI, Anthropic, Google, and many others.
## Getting Started
- [Structured Outputs for LLMs](https://python.useinstructor.com/index.md): Introduction to structured outputs with LLMs
- [Getting Started](https://python.useinstructor.com/getting-started/index.md): Quick start guide
- [Installation](https://python.useinstructor.com/installation/index.md): Installation instructions
## Core Concepts
- [Overview](https://python.useinstructor.com/concepts/index.md)
- [Alias](https://python.useinstructor.com/concepts/alias/index.md)
- [Batch Processing](https://python.useinstructor.com/concepts/batch/index.md)
- [Caching](https://python.useinstructor.com/concepts/caching/index.md)
- [Citations](https://python.useinstructor.com/concepts/citation/index.md)
- [Dictionary Operations](https://python.useinstructor.com/concepts/dictionary_operations/index.md)
- [Distillation](https://python.useinstructor.com/concepts/distillation/index.md)
- [Enums](https://python.useinstructor.com/concepts/enums/index.md)
- [Error Handling](https://python.useinstructor.com/concepts/error_handling/index.md)
- [FastAPI](https://python.useinstructor.com/concepts/fastapi/index.md)
- [Fields](https://python.useinstructor.com/concepts/fields/index.md)
- [from_provider](https://python.useinstructor.com/concepts/from_provider/index.md)
- [Hooks](https://python.useinstructor.com/concepts/hooks/index.md)
- [Stream Iterable](https://python.useinstructor.com/concepts/iterable/index.md)
- [Lists and Arrays](https://python.useinstructor.com/concepts/lists/index.md)
- [Logging](https://python.useinstructor.com/concepts/logging/index.md)
- [Missing](https://python.useinstructor.com/concepts/maybe/index.md)
- [Migration Guide](https://python.useinstructor.com/concepts/migration/index.md)
- [Mode Migration](https://python.useinstructor.com/concepts/mode-migration/index.md)
- [Models](https://python.useinstructor.com/concepts/models/index.md)
- [Multimodal](https://python.useinstructor.com/concepts/multimodal/index.md)
- [Parallel Tools](https://python.useinstructor.com/concepts/parallel/index.md)
- [Stream Partial](https://python.useinstructor.com/concepts/partial/index.md)
- [Patching](https://python.useinstructor.com/concepts/patching/index.md)
- [Philosophy](https://python.useinstructor.com/concepts/philosophy/index.md)
- [Prompt Caching](https://python.useinstructor.com/concepts/prompt_caching/index.md)
- [Prompting](https://python.useinstructor.com/concepts/prompting/index.md)
- [Raw Response](https://python.useinstructor.com/concepts/raw_response/index.md)
- [Validators](https://python.useinstructor.com/concepts/reask_validation/index.md)
- [Retrying](https://python.useinstructor.com/concepts/retrying/index.md)
- [Semantic Validation](https://python.useinstructor.com/concepts/semantic_validation/index.md)
- [Templating](https://python.useinstructor.com/concepts/templating/index.md)
- [Type Adapter](https://python.useinstructor.com/concepts/typeadapter/index.md)
- [TypedDicts](https://python.useinstructor.com/concepts/typeddicts/index.md)
- [Types](https://python.useinstructor.com/concepts/types/index.md)
- [Union](https://python.useinstructor.com/concepts/union/index.md)
- [Unions](https://python.useinstructor.com/concepts/unions/index.md)
- [Usage Tokens](https://python.useinstructor.com/concepts/usage/index.md)
- [Validation](https://python.useinstructor.com/concepts/validation/index.md)
## Integrations
- [Overview](https://python.useinstructor.com/integrations/index.md)
- [Anthropic](https://python.useinstructor.com/integrations/anthropic/index.md)
- [Anyscale](https://python.useinstructor.com/integrations/anyscale/index.md)
- [Azure OpenAI](https://python.useinstructor.com/integrations/azure/index.md)
- [AWS Bedrock](https://python.useinstructor.com/integrations/bedrock/index.md)
- [Cerebras](https://python.useinstructor.com/integrations/cerebras/index.md)
- [Cohere](https://python.useinstructor.com/integrations/cohere/index.md)
- [Cortex](https://python.useinstructor.com/integrations/cortex/index.md)
- [Databricks](https://python.useinstructor.com/integrations/databricks/index.md)
- [DeepSeek](https://python.useinstructor.com/integrations/deepseek/index.md)
- [Fireworks](https://python.useinstructor.com/integrations/fireworks/index.md)
- [Google GenAI](https://python.useinstructor.com/integrations/genai/index.md)
- [Gemini](https://python.useinstructor.com/integrations/google/index.md)
- [Groq](https://python.useinstructor.com/integrations/groq/index.md)
- [LiteLLM](https://python.useinstructor.com/integrations/litellm/index.md)
- [llama-cpp-python](https://python.useinstructor.com/integrations/llama-cpp-python/index.md)
- [Mistral](https://python.useinstructor.com/integrations/mistral/index.md)
- [Ollama](https://python.useinstructor.com/integrations/ollama/index.md)
- [OpenAI Responses](https://python.useinstructor.com/integrations/openai-responses/index.md)
- [OpenAI](https://python.useinstructor.com/integrations/openai/index.md)
- [OpenRouter](https://python.useinstructor.com/integrations/openrouter/index.md)
- [Perplexity](https://python.useinstructor.com/integrations/perplexity/index.md)
- [SambaNova](https://python.useinstructor.com/integrations/sambanova/index.md)
- [Together](https://python.useinstructor.com/integrations/together/index.md)
- [TrueFoundry](https://python.useinstructor.com/integrations/truefoundry/index.md)
- [Vertex AI](https://python.useinstructor.com/integrations/vertex/index.md)
- [Writer](https://python.useinstructor.com/integrations/writer/index.md)
- [xAI](https://python.useinstructor.com/integrations/xai/index.md)