Getlago

Usage Metering

Meter usage in real time. Bill it without the headaches.

Send usage events to Lago Cloud, set flexible prices for each customer, and generate invoices in one place. Premium real-time wallet balances show credits left as customers use your product.

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

Real-time metering
and usage-based billing
at scale.

Your application sends an event. Lago validates and aggregates it into billable usage, then applies the customer's plan. Follow the event through ingestion.

AI gateways & LLMs

  • OpenAI
  • Anthropic
  • Google Gemini
  • Mistral
  • AWS Bedrock
  • Ramp Router
  • Snowflake Cortex
  • Databricks
  • Cloudflare
  • More

API & streaming

  • HTTP
  • Kinesis
  • S3
  • Kafka
  • GCP
  • Redis
  • Azure
  • More
Lago
Usage meteringBilling

Ready for billing

  • Invoicing
  • Real-time credit balances
  • Usage reports
  • Taxes
  • Analytics
  • Revenue Recognition
  • Alerts
  • Governance

Capture your usage

Send events from your application with the API or a Lago SDK.

Define what counts

Aggregate events into billable metrics, from API calls to compute hours.

Choose your pricing

Combine usage charges, subscriptions, and prepaid credits in your plans.

Turn usage into invoices

Apply each customer’s plan to their usage and generate their invoice.

Ingest usage at scale from any source

Bring usage from HTTP APIs, event streams, and LLM gateways into Lago. Connect sources such as Kafka, Kinesis, and your AI stack to ingest usage at scale and turn it into billable metrics.

Ingest usage at scale from any source

Turn raw usage data into accurate invoices

Lago aggregates each customer’s events, applies the plan’s rates, and creates invoice lines from measured usage.

Turn raw usage data into accurate invoices

Bill usage at scale

Use REST batch or Kafka/Redpanda for different event volumes. Validate throughput and invoice accuracy with your workload.

Bill usage at scale

Adapt pricing on the fly

Both non-engineers and engineers can update usage charges via API or Lago’s no-code UI.

Adapt pricing on the fly

Usage-based billing is easy now

Everything you need to bill for usage.

Define billable metrics.

Define billable metrics. Define metrics you’ll charge for. Charge for them directly, include an allowance or use them for credit consumption.

Ingest usage.

Ingest usage. Charge for credits, tokens, compute hours or API calls. Each event carries a transaction_id, so a retried event is billed once.

Create hybrid plans.

Create hybrid plans. Combine usage-based with subscription models.

Customize with overrides.

Customize with overrides. Customize terms like pricing, usage budgets and more for enterprise customers.

Empower all teams with usage data

Engineers

Engineering

Build billing without the headaches.

Product

Product

Ship complex pricing and new packaging faster.

Finance

Finance

Billing for all motions, products and geographies.

Operations

Operations

One source of truth for all billing data.

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

Related reading

Metering, usage-based billing and how teams price on consumption.

Usage Metering 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.

How does Lago turn product usage into billable charges?

Your application sends usage events, such as API calls, tokens or compute time. Lago matches them to customer subscriptions and billable metrics, deduplicates retries, aggregates consumption and applies your pricing.

That usage feeds invoices and real-time wallet balances.

Explore usage ingestion.

Can Lago meter API calls, tokens, storage and time-based usage?

Yes. Lago supports count, count unique, latest, maximum, sum and weighted sum.

Use these to count API calls, total token consumption, measure peak storage, track active seats or calculate resource quantities weighted by the time they were used. Usage measurement documentation

How much usage can Lago ingest at scale?

Lago’s documented benchmarks reached 1–3 million events per second using Kafka or Redpanda with ClickHouse Cloud. Its REST batch API reached approximately 10,000 events per second in the tested setup.

Lago Cloud operates the metering infrastructure for you. Performance documentation

Can Lago account for usage events that arrive late?

Yes. Lago uses each event’s timestamp to assign usage to its billing period. Set an invoice grace period to include late usage before finalization. For recurring billable metrics, late events received after finalization affect the next billing cycle.

Explore ingesting usage

Can I retry usage events without charging customers twice?

Yes. Lago deduplicates repeated usage events. Resend the original payload with the same transaction ID, subscription ID, metric code and explicit timestamp so retries count the usage once. Event ingestion documentation

Can I combine subscription fees and usage charges on one invoice?

Yes. A Lago plan can combine a fixed subscription fee with usage charges, included allowances and overages. For example, charge a monthly platform fee plus the API calls a customer uses beyond their allowance.

Explore plans

What is the difference between usage metering and usage-based billing?

Metering measures what a customer consumes, such as API calls, tokens or compute hours. Billing applies the customer’s prices and contract terms to that consumption. Lago handles both, from usage events to invoices.

Explore ingesting usage

How do I test usage-based billing with Lago?

Create a billable metric, a plan, a customer and a subscription in a test environment. Send a usage event, check the measured quantity and preview the resulting invoice. This lets you validate your pricing before connecting production traffic.

Explore integration testing

Can I set different usage prices by model, region or customer?

Yes. Include details such as model or region in your usage events, then configure charge filters to apply the corresponding rates. Use subscription overrides to set negotiated prices for individual customers.

Explore pricing filters

Lago solves complex billing.