LAPIS: Lightweight API Specification for Intelligent Systems
Daniel Garcia (cr0hn)

TL;DR
LAPIS is a lightweight, domain-specific API specification format designed for large language models, significantly reducing token overhead compared to OpenAPI while preserving essential semantic information for API reasoning.
Contribution
We introduce LAPIS, a compact API specification format optimized for LLMs, with structural innovations and automated conversion from OpenAPI, enabling efficient API understanding.
Findings
Achieved 85.5% average token reduction compared to OpenAPI YAML
Achieved 88.6% average token reduction compared to OpenAPI JSON
Demonstrated effectiveness on five real-world API specifications
Abstract
Large Language Models (LLMs) increasingly serve as consumers of API specifications, whether for code generation, autonomous agent interaction, or API-assisted reasoning. The de facto standard for API description, OpenAPI, was designed for documentation tools and code generators, resulting in substantial token overhead when used as LLM context. We present LAPIS (Lightweight API Specification for Intelligent Systems), a domain-specific format optimized for LLM consumption that preserves the semantic information necessary for API reasoning while minimizing token usage. Through empirical evaluation against five real-world production API specifications including GitHub (1,080 endpoints), Twilio (197 endpoints), DigitalOcean (545 endpoints), Petstore, and HTTPBin we demonstrate an average token reduction of 85.5% compared to OpenAPI YAML and 88.6% compared to OpenAPI JSON, measured with the…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware System Performance and Reliability · Scientific Computing and Data Management · Model-Driven Software Engineering Techniques
