# Your AI app might be losing money on its heaviest users. Here's how to check.

> Source: <https://dev.to/theaicommit/your-ai-app-might-be-losing-money-on-its-heaviest-users-heres-how-to-check-4150>
> Published: 2026-10-23 00:01:45+00:00

If you sell an AI app by subscription, your revenue per user is flat and your cost per user is not.

A light user costs you a few cents a month. A heavy one, or a user stuck in an agent loop, can cost more than they pay you. Your OpenAI bill shows tokens. Your payments dashboard shows revenue. Nothing joins the two by user, so you find out from the invoice.

I built [FiscaLLM](https://github.com/magna56/fiscallm) to answer one question: **which users cost me more than they pay?** Here's the idea and how to try it in about ten minutes.

``` js
import { createMeter } from "fiscallm"; // npm install fiscallm  (Python: pip install fiscallm)

const meter = createMeter({ apiKey: process.env.FISCALLM_KEY, waitUntil });

const res = await openai.chat.completions.create({ model, messages });
meter.trackOpenAI(res, { userId, feature: "chat" });
```

The SDK reads only the model name and token counts. It never sees prompts or answers. Events are batched in the background, so it doesn't add latency to your request, and if FiscaLLM is down your app is unaffected.

Paste a RevenueCat or Stripe webhook URL, or send payments yourself with the revenue API. FiscaLLM joins revenue and cost on the user ID.

You get margin per user, per plan and per free trial, plus which model or feature drives the bill. Then you can act:

`meter.check(userId)` before an AI call. It fails open, so an outage never blocks your users.`SELF-HOSTING.md` in the repo, so your data never touches a third party's servers. Or use the free hosted version.
I'm looking for the first 10 apps to try it. If you ship an AI app with subscriptions, tell me what's missing in the comments or on the [roadmap board](https://github.com/users/magna56/projects/1).
