ospalabs
Stop the spend · New

Every customer gets their own budget

If your product calls an LLM on behalf of users, one user can be most of your bill: a script, a power user, an abuser. Per-customer budgets cap each of them on their own, without you writing a metering system.

  1. 01

    One header

    Send x-fuse-user with any id you like (or OpenAI's user field). Use an opaque id, not an email.

  2. 02

    Same cap, applied separately

    Set a daily and/or monthly cap per customer. Each id gets its own window.

  3. 03

    Top spenders

    The Usage panel ranks customers by spend, with requests and refusals.

app.ts
await client.chat.completions.create(
  { model: "gpt-4.1-mini", messages },
  { headers: { "x-fuse-user": account.id } },
);

Questions

What does the customer's request get?
402 fuse_blown with scope "customer" and the customer id, so you can show them a clear message.
Is there a limit on the number of customers?
No fixed limit. Each customer with a cap uses a small counter that is cleaned up when its period ends.