Lago has been able to follow the pace of our releases and has allowed us to focus on what we do best.

AI billing software
AI companies like CoreWeave, Groq and Mistral AI use Lago to meter tokens, GPU time and agent actions in real time. Bill them pay-as-you-go, with prepaid credits, subscriptions, hybrid plans or enterprise contracts, all in one usage-based billing platform.
Wrap your OpenAI, Anthropic or Bedrock client and every model call becomes a usage event in Lago.
Fund agents with prepaid wallets and get alerted as balances run low, before spend gets out of hand.
Let agents pay per request over HTTP 402, with each payment tied to the usage it covers.
Connect agents to Lago through the MCP server, the CLI or the API. Each one reads and writes the same billing data.
Create a Lago plan from plan.json using the CLI:
lago plans create --input @plan.json --output jsonExample Lago JSON response for a yearly Basic plan with usage-based API charges:
{
"plan": {
"name": "Basic",
"code": "basic",
"interval": "yearly",
"amount_cents": 90000,
"amount_currency": "USD",
"charges": [
{
"billable_metric_code": "api_calls",
"charge_model": "standard"
}
]
}
}Engineering gets granular usage data.
Finance gets a clear path from consumption to revenue.
Every token type, accounted for.
Illustrative stacked bar chart of 18 days of AI usage, totaling 1,185,000 tokens. Input, output, and cached tokens are measured separately. Daily usage grows from 24,000 to 135,000 tokens.
Any usage signal.Input, output and cached tokens, GPU time, requests and model variants, with no pre-aggregation.





See how ambitious teams build and scale their billing with Lago.
Lago has been able to follow the pace of our releases and has allowed us to focus on what we do best.

Every pricing lever AI companies use, in one engine.
Cap tokens, requests or seats per plan, override per customer, and enforce limits from a webhook.
Know when a customer's usage spikes or credits run low, and act before the bill does.
Lago Cloud, or the open-source engine in your VPC or an air-gapped environment.
AI billing software meters AI usage (tokens, GPU time, requests and agent actions), prices it by model and customer, and uses it to update current usage and wallet balances before invoicing. Lago does this in one open-source billing engine, as a managed cloud or self-hosted.
Send token usage as events with the model and token type as properties, then set a price for each. Input, output and cached tokens can each have their own rate. Lago totals usage per customer and invoices it, or deducts it from prepaid credits.
Yes. For example, a voice AI app could charge $500 a month for 10,000 completed minutes, then $0.04 per extra minute. At 12,000 minutes, that is $80 of overage before credits and tax. Lago rates and invoices the usage; your app decides whether to start or stop a live call.
Customers buy or receive credits in a wallet. The ongoing balance reflects current usage, while the invoiced balance updates when an invoice is finalized. Wallets support automatic top-ups, free credits, expiration dates, balance alerts, and up to five active wallets per customer applied in priority order.
Yes. The ongoing wallet balance typically updates in under a second after an event lands. Customers can see it in the portal, and your product can read it and current usage through the API. Real-time balances are a premium feature.
Define a quota per plan, such as 5M tokens a month, and override it per customer. Usage alerts fire a webhook at soft and hard thresholds, one-time or recurring. Credit alerts fire as balances drop or run out. Your product acts on the webhook to throttle, block, allow overage or offer a top-up.
Price each model separately, bill provider cost plus your markup, and update rates without redeploying. For example, billing $240 of tokens that cost $80 leaves a 66.7% gross margin.