Lago
Open-source metering and usage-based billing infrastructure for subscriptions, credits, invoices and payments, with an API, CLI and MCP server for AI products.
- GitHub stars
- 11k
- Last commit
- yesterday
- Latest release
- v1.53.0
- Licence
- AGPL-3.0
- Self-hosted
- Yes
- Hosted version
- Available

Lago is an open-source billing and monetization platform that meters product usage and turns it into pricing, credits, entitlements, invoices, payments and revenue. It is positioned as infrastructure for AI products, where tokens, compute and API calls need to be measured and charged, but it also handles classic subscriptions and hybrid pricing.
It offers consumption tracking, subscription management, pricing iterations, payment orchestration and revenue analytics. Companies can use Lago Direct to bill their own customers or Lago Embedded to power monetization for their own customers. Integration is through a REST API and SDKs, a CLI for inspecting billing data and running diagnostics, and an MCP server that gives assistants tools to work with live billing data. A local demo prices sample AI requests.
The stack includes Go, Ruby, React and ClickHouse. Lago is licensed under AGPL-3.0 and can be self-hosted, and a managed Lago Cloud is available through the vendor. It suits SaaS and AI companies that want to own their billing logic rather than rely on a closed billing vendor.
Key features
- Usage metering and event ingestion
- Subscription and hybrid pricing management
- Invoices and payment orchestration
- Revenue analytics and reporting
- REST API and SDKs
- CLI and MCP server for AI assistants
- Credits and entitlements
Pricing: The open-source version is free to self-host. Lago Premium, available as Cloud or self-hosted, has no published price and is arranged through a demo or sales contact.



