Lago
getlago · Payments
GitHub stars
10,714Awaiting first sync
No measured star history yet
What is Lago?
Lago handles the part of a software business that sits between usage and revenue. It records what customers use, applies the pricing, and produces invoices and payment requests, so a product team does not have to build and maintain its own billing engine.
Lago is open-source monetization infrastructure for metering product usage, such as tokens, compute or API calls, and turning it into pricing, credits, entitlements, invoices and payments. Teams can use it through its API, SDKs, CLI or MCP, self-host it, or use Lago Cloud.
Core capabilities
- Meter tokens, compute, API calls or any product usage as billable events.
- Turn usage into pricing, credits, entitlements, invoices and payments.
- Integrate through the REST API, SDKs, a CLI or an MCP server for coding agents.
From usage events to invoices
Products send usage events such as tokens, compute time or API calls. Lago turns them into prices, credits, entitlements, invoices, payments and revenue, which suits usage-based and hybrid pricing.
- Metering
- Usage-based pricing
- Invoicing
Built to be integrated by developers and agents
Applications connect through an SDK or the REST API, with an OpenAPI description of every field. A CLI and an MCP server help coding agents design and implement a billing integration, and a maintained demo shows AI requests being priced locally.
- REST API
- SDKs
- MCP
Where it fits
Use cases
- 01
Bill an AI product by usage
Send an event for each request with its input and output tokens, and let Lago apply the price per token and add the charges to the customer's invoice.
- 02
Sell prepaid credits
Give customers credits that usage draws down, and use entitlements to control what each plan can access.
- 03
Offer billing inside your own platform
Use Lago Embedded to provide metering and invoicing to your own customers, rather than building a billing engine yourself.