// usage-based billing for ai

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.

// the problem

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

// the primitives

What QuotaStack gives AI builders

Meter any AI unit, in real time

Tokens, inference calls, agent actions, GPU-seconds — record usage events and burn down credits as they happen.

Reservations for long & streaming jobs

Hold credits when an inference or agent job starts, commit the actual cost on success, release on failure. No more guessing or over-charging.

Idempotent metering — safe retries

A retried or timed-out inference call won't double-charge. Every usage event is idempotent by design.

Credit-native for AI

Prepaid AI credits, wallets, and top-ups out of the box — the model most AI products actually bill on.

Sub-ms entitlement checks

Check "can this user afford this call?" before an expensive generation — safe to call on every request.

Agent-native docs

Every page has a .md twin + llms.txt, so Cursor and Claude Code wire the integration into your AI app for you.

// ship it

Ship AI billing in a handful of API calls

Create a customer, define a metric (tokens / calls / actions), set pricing, grant credits, check an entitlement before the call, record usage, verify the balance. Walk it in the quickstart, or browse the concepts (start with reservations for inference jobs).

// boundaries

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 Payments for global tax). QuotaStack handles the usage-based billing logic on top.

Building the ledger yourself? How to build a credit system for an AI SaaS.

// faq

AI billing FAQ

How do I bill for tokens or inference?

Define a billable metric (tokens, calls, or any unit), then record a usage event per request — QuotaStack meters it in real time and burns down the customer's credits.

What about retries and timeouts — will I double-charge?

No. Usage events are idempotent: a retried or timed-out call that you re-send with the same idempotency key is counted once.

Can I hold or estimate cost for a long or streaming job?

Yes — that's what reservations are for. Reserve credits when the job starts, commit the actual cost when it finishes, or release them if it fails.

Do you host the model or process payments?

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

Is there a free tier?

Yes — every account gets $2 of usage credit each month (~100k events), all core primitives, sandbox, no credit card. After that it's $2 / 100k. There is no plan to pick and no upgrade step.

Start free — meter your first AI usage today.

$2 usage credit/mo (~100k events), then $2 / 100k. Reservations, credits — no credit card.