LeanAPI: An API server for Lean 4

By Harsh Gupta ยท September 28, 2026

Introducing LeanAPI v0.1, an api server for your applications written in Lean 4. Think of it as Express/FastAPI equivalent. Includes all the usual stuff, routing, middlewares, auth and headers.

Diagram of LeanAPI: typed Lean routes pass through route matching, request parsing and validation, handler execution, and typed serialization, then out as a server, JSON responses, status codes, and web APIs.

Enjoy!

GitHub: https://github.com/theoriclabs/leanapi