- 01
Send a customer id with each request
Add the x-fuse-user header with an id from your system. OpenAI's own user field works too: Fuse uses it when no header is sent. Use an opaque id, not an email address.
app.tsimport OpenAI from "openai"; const client = new OpenAI({ baseURL: process.env.FUSE_BASE_URL, apiKey: process.env.FUSE_API_KEY, }); await client.chat.completions.create( { model: "gpt-4.1-mini", messages }, { headers: { "x-fuse-user": account.id } }, ); - 02
See the ranking
The Customers page lists customers by spend for the period, with requests and refusals. It's usually a handful of accounts that drive most of the cost.
- 03
Set a budget per customer
Set a daily and/or monthly cap that applies to every customer, and override it for specific ones (your enterprise account gets more). When one customer reaches it, only their requests get 402.
- 04
Compare cost to price
Export the period's usage as CSV and set each customer's LLM cost against what they pay. That's your real margin per plan.
How to track OpenAI cost per customer (and cap it)
Updated October 2026
To price an AI feature you need to know what a customer actually costs. Provider dashboards show totals per key or project, not per customer of your app, so most teams either guess or build a logging pipeline.
If each request says which customer it's for, Fuse does the counting, and can stop a single customer at a limit without touching anyone else.
Questions
What happens to other customers when one hits their cap?
Nothing. Each customer has their own window; the rest keep working under the project ceiling.
Can I block a customer completely?
Yes. A blocked customer's requests get 403 customer_blocked until you unblock them.