Getlago

AI billing software

Bill AI usage as your pricing evolves

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.

Lago meters input, output, and cached tokens in real time. Usage events from sources such as OpenAI, Anthropic, Google Gemini, Mistral, Ramp Router, Snowflake Cortex, Databricks, Cloudflare, AWS Kinesis, Amazon S3, Google Cloud, Redis, and Azure stream into one chart showing 1.2 million tokens. An events feed lists each metric as it arrives, at rates between 100 and 50,000 events per second.

Trusted by the most innovative companies

Mistral AI
PayPal
Groq
Synthesia
Laravel
Swan
Epicor
1NCE
Cerebrium
Blacksmith
Lune
OQC

Every AI pricing model, one billing engine

Start with one model, add the next when your pricing changes, and mix them in a single plan.

Charge for every minute, token or request, with no commitment.

LLM token usage in Lago, broken down by model and token type, above the revenue it billed over the year

Metering and billing for AI agents

AI Billing SDK

Wrap your OpenAI, Anthropic or Bedrock client and every model call becomes a usage event in Lago.

Agent spend control

Fund agents with prepaid wallets and get alerted as balances run low, before spend gets out of hand.

x402 Payments

Let agents pay per request over HTTP 402, with each payment tied to the usage it covers.

Tools for AI agents

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 json

Example 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"
      }
    ]
  }
}

Meter every token,
GPU-second and agent action

Engineering gets granular usage data.
Finance gets a clear path from consumption to revenue.

See AI metering in actionExplore usage metering

AI usage over time

Every token type, accounted for.

1.19Mtokens metered
Input tokens654.00K
Output tokens236.00K
Cached tokens295.00K

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.

Powering fast-growing AI scaleups.And global enterprises.

See how ambitious teams build and scale their billing with Lago.

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

— Timothée Lacroix, CTO, Mistral AI

Timothée Lacroix

How Lago supports AI billing.

Every pricing lever AI companies use, in one engine.

Cost-plus pricing.

Pass provider costs through with your markup: $0.0100 + 30% = $0.0130 per call.

Usage quotas.

Cap tokens, requests or seats per plan, override per customer, and enforce limits from a webhook.

Real-time alerts.

Know when a customer's usage spikes or credits run low, and act before the bill does.

Related reading

AI Billing FAQ

Does Lago update prepaid credit balances in real time?

Yes. Lago’s ongoing wallet balance typically refreshes in under a second after a new event is included in usage. It reflects remaining prepaid credits after current usage, including taxes.

Use this live balance in customer dashboards and configure balance alerts and automatic top-ups.

See the event-to-wallet flow and wallet documentation.

Can Lago handle negotiated enterprise contracts?

Yes. Customize subscription fees, usage rates, minimum commitments and billing thresholds for each customer’s subscription while keeping a shared plan structure.

Lago applies those negotiated terms when calculating charges and generating invoices.

Explore customer-specific pricing.

Do I need to self-host Lago or manage billing infrastructure?

No. Lago Cloud is a fully managed billing platform. Lago handles hosting, scaling, upgrades and monitoring. Your team connects customer and usage data, configures pricing and connects your payment and finance tools.

Self-hosting is also available if you prefer to operate Lago in your own environment.

Explore managed Lago Cloud.

Can Lago bill customers for AI products and features?

Yes. Meter tokens, requests, compute time or your own product usage, then apply the prices you charge customers. Lago combines those charges with subscriptions, prepaid credits and negotiated contracts, and generates the resulting invoices.

Explore ingesting usage

Can I set customer prices and markups for AI usage?

Yes. Set your own rates by model and token type, or use the Agent SDK’s supported price mode to apply a markup to reference model prices. Manage the prices you charge customers separately from provider rates.

Explore openai

Can I bill a voice AI product with included minutes and overage?

Yes. Send completed call minutes as usage and configure a subscription with an included allowance and an overage rate. For example, a $500 monthly plan with 10,000 included minutes and $0.04 per extra minute adds $80 of usage charges at 12,000 minutes, before credits and tax.

Explore plan model

What does a Lago prepaid wallet manage?

A Lago wallet tracks purchased and promotional billing credits that customers use to pay eligible invoices.

Configure which charges those credits cover, their expiration rules and automatic top-ups. The ongoing balance shows remaining credits after current usage, including taxes.

Explore prepaid wallets.

Can I stop usage when a customer runs out of prepaid credits?

Yes. Configure Lago’s ongoing balance alerts to trigger a restriction in your application when credits reach your chosen threshold. Your application enforces access using those alerts and its own request checks.

You can also set earlier thresholds to warn customers and prompt them to top up before their credits run out.

Explore credit balance alerts.

Can existing customers keep their prices when we launch a new offer?

Yes. Create a new plan for the new offer and keep existing customers on their current plans. You choose which customers receive each offer and whether to migrate existing subscriptions.

Explore plans and pricing.

Lago solves complex billing.