Economic Modeling: Running a free AI tier without going bankrupt

Economic Modeling: Running a free AI tier without going bankrupt

Backer posted Originally published at www.pocketportfolio.app 1 min read

Economic Modeling: Running a free AI tier without going bankrupt

Gemini Flash (free tier): low cost per token; suitable for most portfolio and market questions. Gemini Pro (paid): higher capability and cost; for power users. We estimate cost per query (input + output tokens) and per user per month to set quotas and tier limits.

Tiered quotas

Free: N questions per month (e.g. 20). Founder's Club / paid: unlimited (or higher cap). Quotas stored and enforced via Firestore: usage incremented per successful request; reset on a schedule (e.g. monthly). When the user hits the limit, the UI shows a friendly message and optional upgrade CTA.

Cost per query and break-even

We estimate cost per query as (input tokens + output tokens) times cost per 1K tokens for the chosen model. For Flash, that is typically a fraction of a cent per question. Free tier (e.g. 20 questions/month) is a marketing cost; we cap it so that abuse is limited. Paid tier is priced to cover the marginal cost plus margin.

Example: Assume Flash costs 0.075 per 1M input tokens and 0.30 per 1M output tokens (illustrative). A typical request might be 2,000 input tokens and 500 output tokens. Cost per request is about 0.0003. So 20 free questions per user per month is about 0.006 per user per month. At 10,000 free users that is 60/month — a manageable marketing cost.

Firestore schema for usage and quotas

We store per-user usage in Firestore: userId, tier, periodStart, questionsUsed, optionally lastRequestAt. When a request arrives, we read the document, check if questionsUsed is below quotaForTier(tier), and if so increment and proceed. If the period has rolled over (e.g. new month), we reset questionsUsed to 0. We do not store the content of requests; we only store counts and timestamps. The client can call GET /api/ai/usage to receive remaining, limit, periodEnd for display in the UI.


Part 8 of Sovereign Intelligence Serial — adapted from Sovereign Intelligence: Building Local-First RAG for Finance.

Read the full Sovereign Intelligence or Try the app.

More Posts

Sovereign Intelligence: The Complete 25,000 Word Blueprint (Download)

Pocket Portfolioverified - Apr 1

Architecting a Local-First Hybrid RAG for Finance

Pocket Portfolioverified - Feb 25

The Privacy Gap: Why sending financial ledgers to OpenAI is broken

Pocket Portfolioverified - Feb 23

I’m a Senior Dev and I’ve Forgotten How to Think Without a Prompt

Karol Modelskiverified - Mar 19

The Roadmap: Moving from AI Chatbots to Autonomous Financial Agents

Pocket Portfolioverified - Mar 25
chevron_left

Related Jobs

View all jobs →

Commenters (This Week)

3 comments
1 comment

Contribute meaningful comments to climb the leaderboard and earn badges!