10.5k stars · AGPL-3.0 · v1.52.1 (2026-08-27)
Open-source metering and usage-based billing API — counting what someone used and turning it into a number they owe.
▶Repo detailsthe review · specs · pros & cons · install
What it is
An open-source metering and billing API: it ingests usage events, aggregates them, applies your pricing plan and produces invoices. It covers subscriptions, prepaid wallets, credits, coupons and revenue analytics, and hands the actual card charge off to Stripe or another processor.
Why it matters
Grasppy's real cost is per import — model calls, embeddings, storage — so a flat monthly price either loses money on heavy users or overcharges light ones, and you cannot tell which until you can meter. Lago is what lets you charge per map, per document or per thousand messages without hand-writing invoicing logic, prorations and tax lines. It also solves the thing that actually sinks usage-based pricing in practice: showing a customer, mid-month, what they have spent so far, before the invoice surprises them. And it is the one entry here that lets you change your pricing model later without a data migration, which for a product still finding its shape matters more than the billing does.
- Genuinely usage-based — metering, aggregation, wallets and credits — rather than subscriptions with a usage bolt-on.
- Ships roughly weekly; v1.52.1 landed on 27 August, nine days before this report.
- API-first, so FastAPI talks to it directly and there is no SDK lock-in.
- AGPL-3.0: fine to run for your own business, but read it before linking anything into a distributed product.
- The production topology is Rails plus Postgres, Redis, Kafka and ClickHouse. This is not a small container on a shared box.
- Usage-based pricing is a product decision, not a plugin. Getting the metering model wrong is expensive to unwind once customers are on it.
FastAPI posts a usage event when a Grasppy import completes; Lago aggregates and invoices; Stripe takes the money.



