xgrammar: Structured Generation
JSON →xgrammar is a Python library focused on efficient, flexible, and portable structured generation, primarily for Large Language Models (LLMs). It allows defining output constraints using grammars (e.g., JSON schema) to ensure LLM outputs conform to specific formats. It is under active development, with frequent minor releases providing new features and performance improvements.
Traffic · last 30 days ↑350% vs prev 7d
total hits 15
actors 6 distinct systems
last hit 1d ago Googlebot
top countries 🇺🇸 United States · 🇩🇪 Germany · 🇨🇦 Canada · 🇮🇳 India
API endpoints
full doc /v1/registry/xgrammar
install /v1/registry/xgrammar/install
compatibility /v1/registry/xgrammar/compatibility