Skip to content
← Publications

arXiv · 2026

LAPIS: Lightweight API Specification for Intelligent Systems

Authors: Daniel Alfocea

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.

Listen to the audio on why AI turns dumb

I send one email a day, and as soon as you sign up you get a ten minute audio on what almost nobody knows about ChatGPT and Claude.

Daniel Alfocea