What is Lago?
Lago turns usage events into invoices. Your application sends an event per API call, token batch or GPU minute; Lago aggregates them into billable metrics, applies the price plan, tracks prepaid credits and entitlements, issues invoices with tax, and hands collection to Stripe or another payment provider. It covers subscriptions, minimum commitments, graduated and volume pricing, and per-customer overrides in the same model.
The pitch has shifted firmly towards AI products. The README leads with metering tokens by model, input, output, cache, reasoning and tool call, names Mistral AI and Groq among its users, and ships an MIT-licensed MCP server, a CLI and Agent SDKs for Python and JavaScript that wrap OpenAI, Anthropic, Mistral, Gemini and Bedrock clients to report token usage.
The core platform is AGPL-3.0 and self-hostable with Docker Compose or Helm. Lago Cloud runs it for you in US or EU regions, priced on a share of the revenue billed.
Is Lago worth it?
Lago is mature where billing software has to be. Events are deduplicated by transaction_id, so a retried request is not billed twice; a batch with one bad event is rejected whole rather than half-saved; and dedicated workers separate event ingestion, invoicing, webhooks and PDFs so a spike in one does not stall the rest. The repository has about 10,887 GitHub stars, only 18 open issues, and shipped v1.57.0 on 5 November 2026 with commits as recent as 16 November.
For AI products the fit is direct. Token metering by model and direction, prepaid credit wallets with top-ups, usage alerts and entitlements are the pieces an inference API or agent product needs, and Mistral AI's CTO is quoted in the README on the choice. The Agent SDKs report token usage from the LLM client without blocking the call, with under 5 ms of p99 overhead claimed for the JavaScript wrapper.
The agent tooling needs restraint. The MCP server lives in a separate repository, exposes write tools for invoices, credit notes, coupons and payments, and inherits every permission of the API key you give it; the README itself tells you to treat agent credentials as privileged and keep a person confirming billing changes. Self-hosted instances also send basic product analytics by default.
The open-source edition is not quite the whole product. The README says Cloud and self-hosted differ in deployment, not features, yet the pricing page lists custom roles, Okta SSO, audit logs and Lago Embedded only on paid plans, and the Billing Assistant is premium on request. AGPL-3.0 also obliges you to publish changes if you offer a modified Lago to others as a service. Against Stripe Billing, you trade a percentage fee for an operations burden: Postgres, Redis, workers and upgrades are yours.
Where it earns its place
An inference API start-up with prepaid and pay-as-you-go customers
Charge per input and output token by model and sell credit packs that top up automatically
Wrap the OpenAI or Anthropic client with the Lago Agent SDK to send token events, define per-model billable metrics and a wallet with auto top-up, and let Lago issue invoices through Stripe. Self-hosted, the software is free; on Cloud Launch the first $100,000 of billings carry no fee, then 0.7%.
A finance lead at a 30-person developer-tools company
Move from hand-built usage invoices to a system that handles minimums, overages and tax
Model plans with allowances, minimum commitments and graduated tiers in the Lago UI, sync to NetSuite or Xero, and use usage alerts to warn customers before overages. Scale starts at a $12,000 yearly minimum if the team wants it hosted.
A platform engineer who wants an agent to answer billing questions
Ask what a customer used this month without opening dashboards
Connect the Lago MCP server with a restricted API key in a test organisation first, since its tools can also create credit notes and coupons, and keep write operations behind human confirmation.
Before you commit
- Setup
- Clone the repository, generate an RSA key into .env and run docker compose up; the UI runs on port 80 mapped to container port 8080 since v1.56.0. Production uses the self-hosted guide or Helm charts with dedicated workers.
- Integrations
- REST API with OpenAPI spec; clients for Node.js, Python, Ruby and Go; Stripe and other payment providers; Salesforce, HubSpot, NetSuite, Xero, Avalara, cloud marketplaces and data warehouses; webhooks; MIT-licensed CLI, MCP server and Agent SDKs.
- Data and privacy
- Self-hosted data stays in your Postgres; basic product analytics are collected by default, without customer PII or financial data according to the README. Lago Cloud runs in US or EU regions and the company is SOC 2 Type II certified.
- Cost at scale
- Self-hosted cost is infrastructure and on-call time. Cloud takes 0.7% of billings on Launch after the first $100,000, and from 0.6% on Scale with a $12,000 yearly minimum; payment processor fees come on top.
- Limits
- Custom roles, Okta SSO, audit logs and Lago Embedded need a paid plan; Billing Assistant is premium on request; Cloud Launch's free allowances are one-time, not monthly.
What’s good
- Idempotent event ingestion and atomic batches
- Token, compute and credit-based pricing in one model
- Agent SDKs that meter LLM calls without blocking them
- Active releases and few open issues
What’s not
- SSO, audit logs and custom roles are paid-only
- MCP server can write invoices and payments with full key permissions
- Product analytics on by default when self-hosted
- AGPL-3.0 obligations for modified hosted versions
Best for
Companies selling AI or API products by usage that want metering and invoicing on their own infrastructure, or an open alternative to percentage-based billing platforms.
Lago: common questions
- Is Lago worth it?
- Lago is the billing engine to self-host if you sell AI by the token and do not want Stripe Billing deciding how your pricing can work, as long as you accept AGPL and run it like the financial system it is. We rate it 4.2 out of 5.
- How much does Lago cost?
- Self-hosted edition free under AGPL-3.0. Lago Cloud Launch: first $100,000 of billings free once, then 0.7%; first 5 million events free once, then $20 per million. Scale: from 0.6% with a $12,000 yearly minimum. Enterprise: custom. Payment processor fees are separate.
- What are the downsides of Lago?
- SSO, audit logs and custom roles are paid-only; mCP server can write invoices and payments with full key permissions; product analytics on by default when self-hosted; aGPL-3.0 obligations for modified hosted versions.
- Who is Lago best for?
- Companies selling AI or API products by usage that want metering and invoicing on their own infrastructure, or an open alternative to percentage-based billing platforms.
- How much does Lago cost for a team or in production?
- Self-hosted cost is infrastructure and on-call time. Cloud takes 0.7% of billings on Launch after the first $100,000, and from 0.6% on Scale with a $12,000 yearly minimum; payment processor fees come on top.
- Is Lago safe for company data?
- Self-hosted data stays in your Postgres; basic product analytics are collected by default, without customer PII or financial data according to the README. Lago Cloud runs in US or EU regions and the company is SOC 2 Type II certified.
Answers checked Nov 16, 2026.