All use cases

SaaS with metered AI

You run a SaaS product where AI is a paid feature: summarization, code-completion, content generation. You need to know exactly how much each paying user costs you, enforce per-user budgets so a runaway prompt doesn't blow your margin and push metered usage into Stripe for billing. Building this yourself means gluing together counters, provider webhooks and a retry queue. Weeks of plumbing. None of it ships features.

Why Ringside

  • FC-Customer header. Every request is tagged with your user's ID; usage, cost and margin roll up automatically in the dashboard and via /v1/usage.
  • Per-Customer monthly budget cap. Set monthly_budget_usd at create time; requests return 402 customer_budget_exceeded the instant the cap is hit, no monitoring cron required.
  • Prepaid customer wallet. For credit-based or pay-in-advance products: top up a customer's wallet via POST /v1/customers/:id/wallet/topup, and Ringside automatically debits each call from their balance. Requests return 402 customer_wallet_empty when funds run out.
  • wallet.low + budget_exceeded webhooks. Fire on threshold crossings so your billing service can top up, apply dunning or escalate in real time.

Architecture

Your appweb / APIRingsideFC-Customer: user_42Model providersOpenAI / Anthropic / ...Stripe / billingmetered usage

In code

# On signup, create a Ringside Customer for the paying user
customer = client.customers.create(
    external_id=user.id,
    name=user.email,
    budget_usd=25.00,             # hard stop when they hit cap
)

# On every AI call, stamp the Customer header
resp = client.chat.completions.create(
    model="fc:openai/gpt-4o",
    messages=[{"role": "user", "content": prompt}],
    extra_headers={"FC-Customer": customer.id},
)

# Nightly: pull per-customer usage, push to Stripe as metered
usage = client.usage.retrieve(customer_id=customer.id, since="2026-04-01")
stripe.UsageRecord.create(
    subscription_item=user.stripe_item,
    quantity=int(usage.total_cost_usd * 100),  # cents
    timestamp=int(time.time()),
)

Cross-links

Used by

[TODO: real customers]

Get started in 5 minutes →