cd /news/ai-tools/your-ai-app-might-be-losing-money-on… · home › topics › ai-tools › article
[ARTICLE · art-155706] src=dev.to ↗ pub= topic=ai-tools verified=true sentiment=↑ positive

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

A developer built FiscaLLM, an open-source SDK that joins per-user AI token costs with subscription revenue to surface which users cost more than they pay. The tool reads only model names and token counts from OpenAI responses, batches events in the background to avoid latency, and ingests payments via RevenueCat or Stripe webhooks, reporting margin per user, plan and trial. It can be self-hosted, and the developer is seeking the first 10 apps to try it.

by read1 min views3 publishedOct 23, 2026

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 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.

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.

── more in #ai-tools 4 stories · sorted by recency
── more on @fiscallm 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/your-ai-app-might-be…] indexed:0 read:1min 2026-10-23 · —