Abstract
A new format for describing APIs, built for LLMs. It uses 85.5% fewer tokens than OpenAPI YAML and 88.6% fewer than OpenAPI JSON, tested on GitHub, Twilio and DigitalOcean APIs.
OpenAPI was designed to generate code and document APIs. When an LLM reads it, it spends tokens on information the model doesn’t need.
LAPIS is a format for describing APIs, built around how language models read documentation. I tested it on GitHub, Twilio and DigitalOcean APIs, and the average reduction is 85.5% fewer tokens than OpenAPI YAML and 88.6% fewer than JSON.
Besides being smaller, LAPIS includes centralized error handling, webhook triggers, rate limiting descriptions and operation flows, things OpenAPI scatters around or doesn’t cover.
There’s an automatic converter from OpenAPI 3.x, and the specification is open, under CC BY 4.0.