New guide

Refine your pricing strategy with a complete guide to pricing economics for AI agents.

Get the guide
×

What is AI metered billing?

Metered billing records each unit of usage, totals it per period, and invoices in arrears. How it works, what each event should record, and what breaks the count.

What is AI metered billing?

Metered billing is the process of recording each unit of usage, such as tokens or agent runs, totaling it per billing period, and invoicing in arrears. An agent completing 5,000 runs in March at $0.40 each produces a $2,000 invoice in April. Usage-based pricing sets the price; metered billing produces the bill, and the vendor answers for every miscounted event.

For AI products, metered billing has a harder job than counting. One agent run can call three models, read a long context, and retry twice, so identical runs can carry very different provider costs. A meter that records only what you charge produces a correct invoice and still hides the customers you lose money on. That makes metered billing the base layer of AI billing: it has to count every billable event once and capture what each one cost you.

How does metered billing work?

Metered billing works in four steps: capture each usage event, aggregate events into totals per customer, rate the totals against the plan, and invoice when the billing period closes.

Flow diagram of metered billing: capture each usage event with a unique ID, aggregate per customer, rate against the plan, and invoice in arrears. An optional lower row records provider cost per event, sums cost per customer, and shows margin per customer from one record.
Metered billing flow · 4 steps, with provider cost recorded alongside

The top row is what every metered billing system does. The lower row is optional, and it is what lets the same pipeline answer a second question: what did each customer cost you to serve?

The aggregation rule depends on the metric. API calls are counted, tokens and minutes are summed, and seats or storage are usually measured as a maximum or an average across the period.

Metered billing vs usage-based pricing

Metered billing is the mechanism and usage-based pricing is the commercial model it serves. Many pages use the two terms interchangeably, but they answer different questions and are owned by different people. Subscription billing, the usual alternative, charges a fixed amount in advance and needs no meter.

Metered billingUsage-based pricingSubscription billing
What it isThe system that records, totals, and invoices usageThe decision to charge per unit, and at what rateBilling a fixed fee for access
Typical ownerEngineering and finance operationsFounders, product, and pricingFinance
When the customer paysIn arrears, after the period closesSet by the planIn advance
Typical failureMiscounted or missing eventsA unit that doesn't track cost or valuePaying for seats nobody uses

A usage-based price can't work without metered billing. Metered billing also runs under hybrid plans, credit balances, and overage charges, wherever the bill depends on what was used.

Metered billing examples

Metered billing examples differ mainly in what gets counted and how it is totaled: a count of messages, a sum of minutes or tokens, or storage averaged over the month. Rates below are from each company's own pages, checked in November 2026.

CompanyWhat is meteredHow it is totaledRate
Twilio SMSMessage segments sent or received in the USCount of segments$0.0083 per segment, plus carrier fees
GitHub ActionsRunner minutes beyond the plan's included minutesSum of minutes, by runner type$0.006 per minute on a Linux 2-core x64 runner
OpenAI APITokens processed, by model and token typeSum of tokens: input, cached input, and outputGPT-6.2 Astra: $8.00 per 1M input tokens, $40.00 per 1M output tokens
Amazon S3Data stored (S3 Standard, US East)Average gigabytes stored over the month$0.023 per GB for the first 50 TB

The totaling rule matters as much as the rate. Summing stored gigabytes instead of averaging them would bill a customer many times over for the same data.

What should a metered billing event record?

A metered billing event should record enough to price it, prove it, and cost it. Most meters capture the first: customer, quantity, time. The other two decide whether you can defend an invoice and whether you know what a customer earns you.

Here is an illustrative event, called a signal, for one conversation handled by an AI support agent:

{
  "event_id": "conv_8f2a91_final",
  "customer_id": "acme",
  "agent_id": "support-triage",
  "metric": "conversation_completed",
  "quantity": 1,
  "occurred_at": "2026-10-14T09:12:44Z",
  "model": "provider-model-a",
  "input_tokens": 9000,
  "output_tokens": 1200,
  "provider_cost_usd": 0.045
}
FieldWhy it is there
event_idA unique key, so a retried send is counted once
customer_id, agent_idWho to bill, and which agent did the work
metric, quantityWhat to price
occurred_atWhen the usage happened, which decides the billing period even if the event arrives late
model, token counts, provider_cost_usdWhat the event cost you

The cost in this illustrative example assumes a model priced at $3 per million input tokens and $15 per million output tokens: 9,000 input tokens cost $0.027 and 1,200 output tokens cost $0.018, so $0.045 in total. At $0.30 per conversation, this signal earns $0.255, an 85% margin.

The payoff comes at month end. When price and cost sit on the same record, margin per customer is a sum over that customer's signals. When the meter holds only quantities, cost has to be rebuilt from provider invoices that cover every customer at once, and margin per customer becomes an estimate.

What breaks metered billing?

Metered billing breaks when the count is wrong, and the count goes wrong in four predictable ways.

FailureHow it happensFix
Duplicate eventsA client retries after a timeout and the event is recorded twiceDeduplicate on event_id at ingestion
Late eventsUsage from the 31st arrives on the 2nd, after the invoice is cutBill by occurred_at, keep a grace window open, and post corrections as a separate line
Period boundariesTime zones or a mid-day cutover put usage in the wrong monthOne clock (UTC) for every period, stated in the contract
Dropped eventsA worker crashes and its queue is lostDurable queues, and a daily reconciliation of events sent against events received

Small error rates turn into real money. Take an illustrative customer with 2 million billable events a month at $0.002 each, a $4,000 invoice. If 0.5% of events are duplicated by retries, that customer is overbilled $20. Across 100 similar customers, that is $2,000 a month billed for usage that never happened, and each one is a dispute waiting for the customer to notice.

Late events push the other way. If 1% of usage arrives after the close and is ignored, you underbill each of those customers $40 a month, and the total grows as usage does.

When metered billing is the wrong fit

Metered billing earns its keep when usage varies and each unit costs you something. Skip it when:

  • Usage is flat and cheap to serve. If every customer uses roughly the same amount, a subscription bills the same total with no pipeline to run.
  • You have a handful of large contracts. Five customers on negotiated annual terms can be invoiced by hand until volume justifies a meter.
  • Customers can't see their usage. If you can't show usage as it accrues, an invoice in arrears arrives as a surprise. Build the usage view first, or bill a fixed amount until you can.

Metered billing with Clocknext

Clocknext turns each signal your agent sends into both a line on the invoice and a line in your margin. Signals carry the quantity you bill and the provider cost behind it, so the same record that produces an invoice shows what that customer, agent, and model earned you.

Billing timing is set per entitlement, so metered usage billed in arrears can share a plan with prepaid credits or a flat fee.

Talk to us about metering your agent's usage.

Frequently asked questions

Is metered billing the same as usage-based billing?

The terms are often used interchangeably. Strictly, usage-based billing or pricing is the decision to charge for consumption, and metered billing is the system that measures that consumption and turns it into an invoice. Every usage-based price depends on metered billing to produce the bill.

Is metered billing charged in advance or in arrears?

Metered billing is charged in arrears: usage is recorded during the period and invoiced after it closes, because the total isn't known until then. Plans that combine a fixed fee with metered usage often bill the fixed part in advance and the metered part in arrears on the same invoice.

What can be metered?

Anything you can count reliably per customer can be metered: API calls, messages, tokens, compute minutes, gigabytes stored, active users, or completed tasks. The best metric is one the customer understands and one that moves with your cost to serve.

How do you prevent double counting in metered billing?

Give every event a unique ID at the source and deduplicate on that ID when events arrive, so a retried send is recorded once. Pair that with a reconciliation that compares events sent against events received each day, so drops and duplicates surface before the invoice does.

What is a billable metric?

A billable metric is the rule that turns raw events into the number on the invoice. It names the event to count and the totaling method: count, sum, maximum, unique values, or an average over the period. Storage is usually averaged, while API calls are counted.

Metered billing, Billing engineering, Margin

Manish Balaji

Manish Balaji

Head of Marketing at Clocknext

A fan of compelling stories, memorable product experiences, and Liverpool FC, not necessarily in that order.