# Outlines — Guaranteed Structured LLM Outputs > Outlines guarantees valid structured outputs from any LLM. 13.6K+ GitHub stars. JSON, Pydantic, enums, regex constraints during generation. ## Install Save as a script file and run: ## Quick Use ```bash pip install outlines ``` --- ## Intro Outlines is a Python library that guarantees valid structured outputs from large language models during generation. With 13,600+ GitHub stars, it works with any LLM (OpenAI, Ollama, vLLM) through a simple model(prompt, output_type) interface. Supports Pydantic models, enums, literals, unions, regex patterns, and JSON schemas. **Best for**: Developers needing reliable structured data extraction from LLMs **Works with**: Claude Code, OpenAI Codex, Cursor, Gemini CLI, Windsurf --- ## Key Features - Guaranteed valid output during generation - Any LLM: OpenAI, Ollama, vLLM, Transformers - Pydantic models and regex constraints - Batch processing - Simple API: model(prompt, output_type) --- ### FAQ **Q: What is Outlines?** A: Outlines guarantees valid structured outputs from any LLM with 13.6K+ stars. JSON, Pydantic, regex constraints during generation. **Q: How do I install Outlines?** A: pip install outlines. --- ## Source & Thanks > Created by .txt. Open source. > [dottxt-ai/outlines](https://github.com/dottxt-ai/outlines) — 13,600+ GitHub stars --- Source: https://tokrepo.com/en/workflows/c62993b1-664e-4c0e-a746-841fd9143370 Author: Script Depot