Menu

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

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

DEV Community: typescript·Mayur Agnani·about 6 hours ago
#XP5s5dU8
#devtotypescript#devto#dev#user#fiscallm
Reading 0:00
15s threshold

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.

What you need

A backend between your app and the AI provider (so apps that call OpenAI straight from the phone aren't covered yet).

A way to know what each user pays: RevenueCat, Stripe (beta), or your own code.

1. Report usage after each AI call

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

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.