<!-- Markdown mirror of https://usage-lab.pages.dev/ (generated from the same source; HTML is canonical). -->

> One POST in, a billing-grade monthly quantity out. Idempotent, late-event safe, per-customer monthly rollups via API or CSV. Flat CAD pricing, no % of revenue.

Early access: the API is live and free signup is open. Paid checkout is currently in Stripe test mode.

# Own your usage meter. Bill from numbers you trust.

Usage Lab records billing-grade usage events for AI and SaaS products: tokens, API calls, jobs, bytes, seats. It dedupes retries, handles late events, rolls everything up per customer per month, ready for your invoices (API or CSV). On Pro and Ultra, it can push monthly totals to your Stripe Billing Meters (beta).

[Try the playground (no signup)](https://usage-lab.pages.dev/playground/) [See the live end-to-end demo](https://usage-lab.pages.dev/demo/) [Meter your AI app (quickstart)](https://usage-lab.pages.dev/docs/quickstart-ai-app/)

## Who it's for

### AI & SaaS founders on Stripe

You already bill through Stripe and want usage-based pricing without moving your whole billing stack.

### Teams who want to own the meter

Your usage numbers live with you, are exportable and portable. Switch billers without re-instrumenting your product.

### Not ready for a billing platform

No sales call, no implementation project, no percentage of your revenue.

## What you get

### One endpoint

`POST /api/v1/usage` with one event or a batch of 100.

### Retry-safe

Send an `Idempotency-Key`. A retry returns the original event and is never counted twice.

### Late events land right

Events up to 30 days late roll into the month they happened.

### Sum, count, unique count

Tokens, requests, or monthly active users. Pick an aggregation per meter.

### Monthly rollups

`GET /api/v1/meters/:meter/rollups?month=YYYY-MM` gives quantity per customer.

### Stripe push beta

Automatic delta push of monthly totals to your own Stripe Billing Meters, set up from your account page. Included in Pro and Ultra. [How it works](https://usage-lab.pages.dev/docs/stripe-push/).

## 30-second demo

Create a meter, send an event, send it again: it counts once. API is live at `https://usage-lab.pages.dev`. [Get a free key](https://usage-lab.pages.dev/signup/) first.

```bash
# 1. Create the meter once (409 meter_exists on re-run is fine)
curl -X POST https://usage-lab.pages.dev/api/v1/meters \
  -H "Authorization: Bearer $USAGE_LAB_KEY" -H "Content-Type: application/json" \
  -d '{"key":"llm_tokens","aggregation":"sum"}'

# 2. Send an event with an Idempotency-Key (reuse it on retries)
curl -X POST https://usage-lab.pages.dev/api/v1/usage \
  -H "Authorization: Bearer $USAGE_LAB_KEY" -H "Content-Type: application/json" \
  -H "Idempotency-Key: req_8f2c1" \
  -d '{"meter":"llm_tokens","subscription":"cus_123","value":1500}'

# 201 {"event":{"status":"created","id":"evt_…","month":"2026-10"},"duplicate":false}
# same call again -> 200 {"event":{"status":"duplicate","id":"evt_…"},"duplicate":true}

# 3. Month-to-date total per customer (add &format=csv for CSV)
curl "https://usage-lab.pages.dev/api/v1/meters/llm_tokens/rollups?month=$(date -u +%Y-%m)" \
  -H "Authorization: Bearer $USAGE_LAB_KEY"

# {"total_quantity":1500,"rollups":[{"subscription":"cus_123","quantity":1500,"event_count":1, …}]}
```

## Pricing

You pay a flat monthly fee for **events per month** and **meters**, in Canadian dollars. Never a percentage of your revenue.

Free

$0 CAD / month

- 100,000 events / month
- 3 meters
- Full API: idempotency, late events, rollups API + CSV
- Raw events kept while your account exists
- Community support by email
- No credit card

[Get a free API key](https://usage-lab.pages.dev/signup/)

Pro

$12 CAD / month

- 2,000,000 events / month
- 10 meters
- Rollups API + CSV export
- Raw events kept while your account exists
- Email support
- Stripe push (beta)

[Start Pro](https://usage-lab.pages.dev/signup/?plan=pro)

Ultra

$36 CAD / month

- 20,000,000 events / month
- 100 meters
- Rollups API + CSV export
- Raw events kept while your account exists
- Priority email support
- Stripe push (beta)

[Start Ultra](https://usage-lab.pages.dev/signup/?plan=ultra)

**Free tier:** 100k events and 3 meters every month, free forever. Enough to meter a real product before it earns anything. Going over doesn't drop your events; we'll tell you before anything changes.

Checkout is in Stripe test mode during early access; no real charges yet.

## How it compares

|  | Usage Lab | Full billing platforms |
| --- | --- | --- |
| Starts at | $0, then flat CAD plans | Contact sales, or a monthly floor plus a % of billing |
| Scope | Meter + monthly rollups (API/CSV); Stripe push (beta) | Replace your billing stack |
| Your invoices | Stay in Stripe | Move to the platform |

## Docs & guides

### [Usage event validator](https://usage-lab.pages.dev/validator/)

Paste event JSON or a batch; see exact API errors, warnings and the normalized event. Embeddable.

### [Usage-based pricing calculator](https://usage-lab.pages.dev/calculator/)

LLM tokens or events: revenue, cost, margin, break-even price. Embeddable.

### [Drop-in LLM metering + margin calculator](https://usage-lab.pages.dev/sdk/)

One-file helper for OpenAI, Anthropic and Vercel AI SDK; check per-token pricing margins.

### [Usage event playground](https://usage-lab.pages.dev/playground/)

Validate an event in your browser: ledger row, response, and and the Stripe meter event body Stripe push sends.

### [Live end-to-end demo](https://usage-lab.pages.dev/demo/)

Real requests and responses: dedupe and rollups.

### [Quickstart: meter an AI app](https://usage-lab.pages.dev/docs/quickstart-ai-app/)

curl + Node: OpenAI/Anthropic tokens to a monthly total.

### [Vercel AI SDK, OpenAI and Anthropic](https://usage-lab.pages.dev/docs/vercel-ai-sdk/)

Input and output tokens per customer, retry-safe, never blocks the response.

### [API docs](https://usage-lab.pages.dev/docs/)

Quickstart, auth, ingestion, idempotency, rollups, errors.

### [Code examples](https://usage-lab.pages.dev/docs/examples/)

curl, Node, Python, retry-safe pattern, Cloudflare Worker middleware.

### [Metering for Stripe usage-based billing](https://usage-lab.pages.dev/usage-based-billing-stripe/)

What a billing-grade meter needs.

### [Idempotent usage events](https://usage-lab.pages.dev/idempotent-usage-events/)

Stop retries from double-billing.

### [Backfilling late usage events](https://usage-lab.pages.dev/backfill-late-usage-events/)

Replays, the 30-day window and adjustments.

### [Usage metering compared](https://usage-lab.pages.dev/usage-metering-comparison/)

Usage Lab vs Stripe meters, Orb, Lago and Metronome: prices with sources and when each fits.

### [UsageBox alternative](https://usage-lab.pages.dev/usagebox-alternative/)

An honest comparison.

### [OpenMeter alternative](https://usage-lab.pages.dev/openmeter-alternative/)

Usage Lab vs OpenMeter (now Kong), with a CloudEvents migration sample.

### [Lago alternative](https://usage-lab.pages.dev/lago-alternative/)

Usage Lab vs Lago (open-source billing), with an event migration sample.

### [Meter AI agent tool calls](https://usage-lab.pages.dev/meter-ai-agent-tool-calls-per-customer/)

Count agent and MCP tool calls per customer as real usage, dedupe retries, read rollups.

### [Amberflo alternative](https://usage-lab.pages.dev/amberflo-alternative/)

Usage Lab vs Amberflo (metering, billing and AI cost platform), with a mapping sample.

### [Metronome & Orb alternatives](https://usage-lab.pages.dev/metronome-orb-alternatives-small-saas/)

What small SaaS teams use instead.

### [Meter LLM tokens per customer](https://usage-lab.pages.dev/meter-llm-token-usage-per-customer/)

OpenAI/Anthropic usage to monthly billing totals.

### [Stripe Billing Meters vs a usage ledger](https://usage-lab.pages.dev/stripe-billing-meters-vs-usage-ledger/)

When Stripe meters are enough, and when you need both.

## Early access

The API and free signup are live. Pro and Ultra checkout runs in Stripe test mode during early access:

[Start Pro](https://usage-lab.pages.dev/signup/?plan=pro)
[Start Ultra](https://usage-lab.pages.dev/signup/?plan=ultra)

Free needs no checkout: [get a key in seconds](https://usage-lab.pages.dev/signup/). Stripe push (beta) is included in Pro and Ultra.

---

Source: https://usage-lab.pages.dev/ · Markdown mirrors: https://usage-lab.pages.dev/index.md, https://usage-lab.pages.dev/docs/index.md, https://usage-lab.pages.dev/docs/mcp/index.md, https://usage-lab.pages.dev/docs/openai-agents-sdk/index.md, https://usage-lab.pages.dev/sdk/index.md, https://usage-lab.pages.dev/docs/quickstart-ai-app/index.md, https://usage-lab.pages.dev/docs/vercel-ai-sdk/index.md, https://usage-lab.pages.dev/docs/examples/index.md, https://usage-lab.pages.dev/docs/stripe-push/index.md, https://usage-lab.pages.dev/docs/cad-checkout/index.md, https://usage-lab.pages.dev/meter-ai-agent-tool-calls-per-customer/index.md, https://usage-lab.pages.dev/meter-llm-token-usage-per-customer/index.md, https://usage-lab.pages.dev/stripe-billing-meters-vs-usage-ledger/index.md, https://usage-lab.pages.dev/usage-based-billing-stripe/index.md, https://usage-lab.pages.dev/idempotent-usage-events/index.md, https://usage-lab.pages.dev/backfill-late-usage-events/index.md · llms.txt: https://usage-lab.pages.dev/llms.txt · OpenAPI: https://usage-lab.pages.dev/openapi.json · MCP: https://usage-lab.pages.dev/mcp · Usage Lab by Canada Site Ops (canada.site.ops@gmail.com)
