---
title: "Usage-Based Billing for AI Products"
description: "AI billing done right — meter tokens, inference, and agent actions, hold credits during long jobs with reservations. Free until you're billing real money."
---

# Usage-based billing for AI products

Meter tokens, inference, and agent actions; hold credits during long jobs with **reservations**; bill on credits — **free until you're billing real money**.

AI products don't bill like SaaS: cost moves per request (tokens, inference calls, agent actions, GPU-seconds) and is unpredictable. You need real-time metering, idempotency (a retried/timed-out call must not double-charge), credits that map to AI usage, and a way to hold cost during long/streaming jobs. Building it yourself is months; Stripe Billing/Metronome/Orb are enterprise-priced and sales-gated. QuotaStack gives AI builders those primitives, self-serve, free until you're making money.

## What QuotaStack gives AI builders

- **Meter any AI unit, in real time** — tokens, inference calls, agent actions, GPU-seconds.
- **Reservations for long & streaming jobs** — hold credits at start, commit actual cost on success, release on failure.
- **Idempotent metering — safe retries** — a retried/timed-out call won't double-charge.
- **Credit-native for AI** — prepaid AI credits, wallets, top-ups out of the box.
- **Sub-ms entitlement checks** — "can this user afford this call?" before an expensive generation.
- **Agent-native docs** — .md twin + llms.txt so Cursor and Claude Code wire it.

## Ship AI billing in a handful of API calls

Create a customer, define a metric, set pricing, grant credits, check an entitlement before the call, record usage, verify the balance. See [the quickstart](/docs/quickstart.md), [concepts](/docs/concepts/), and [reservations](/docs/concepts/reservations.md) for inference jobs.

## What QuotaStack isn't

QuotaStack is the metering, credits, and entitlement layer — **not a model provider and not a payment processor**. Keep your LLM/model provider and your payment provider (or a merchant of record like Paddle, Lemon Squeezy, or Dodo for tax). QuotaStack handles the usage-based billing logic.

Building the ledger yourself? [How to build a credit system for an AI SaaS](/how-to-build-a-credit-system.md).

## AI billing FAQ

- **How do I bill for tokens or inference?** Define a metric (tokens/calls/actions), record a usage event per request; QuotaStack meters it and burns down credits in real time.
- **Retries and timeouts — will I double-charge?** No. Usage events are idempotent; a re-sent call with the same idempotency key counts once.
- **Hold/estimate cost for a long or streaming job?** Yes — reservations: reserve at start, commit actual cost at finish, release on failure.
- **Do you host the model or process payments?** No — QuotaStack is the metering/credits/entitlement layer; keep your model + payment providers (or an MoR for tax).
- **Is there a free tier?** Yes — $2 usage credit/mo (~100k events), all core primitives, no card. After that it's $2 / 100k. No plan to pick.

Start free — $2 usage credit/mo (~100k events), reservations, credits, no card: https://platform.quotastack.io/signup
