GEMINI LABJP
PRO35 — July 17, the date reports had pointed to, has passed without an official Gemini 3.5 Pro announcement or model card. July 24 is being cited as the fallbackNB2LITE — Nano Banana 2 Lite, otherwise known as Gemini 3.1 Flash-Lite Image, arrives as the fastest of the family: roughly four seconds per image at $0.034 per thousandOMNI — Gemini Omni Flash enters public preview, generating video up to ten seconds long at $0.10 per second of outputEDIT — Omni Flash is built around conversational editing. Swap a character, relight a scene, or change the angle in plain language, and the original audio and video tracks stay intactSYNTHID — Both new models carry SynthID watermarking, so anything they produce can be checked for provenance from inside the Gemini appSHUTDOWN — The older image generation models are deprecated and switch off on August 17. Worth checking your migration windowPRO35 — July 17, the date reports had pointed to, has passed without an official Gemini 3.5 Pro announcement or model card. July 24 is being cited as the fallbackNB2LITE — Nano Banana 2 Lite, otherwise known as Gemini 3.1 Flash-Lite Image, arrives as the fastest of the family: roughly four seconds per image at $0.034 per thousandOMNI — Gemini Omni Flash enters public preview, generating video up to ten seconds long at $0.10 per second of outputEDIT — Omni Flash is built around conversational editing. Swap a character, relight a scene, or change the angle in plain language, and the original audio and video tracks stay intactSYNTHID — Both new models carry SynthID watermarking, so anything they produce can be checked for provenance from inside the Gemini appSHUTDOWN — The older image generation models are deprecated and switch off on August 17. Worth checking your migration window
Articles/API / SDK
API / SDK/2026-06-18Advanced

When Revenue and Cost Don't Line Up in a Gemini-Powered Niche SaaS — Field Notes on Metering Usage and Reconciling with Stripe

In a niche SaaS built on the Gemini API, monthly revenue is visible but per-user usage cost is not, so your margin stays a mystery until month-end. These notes cover a metering layer that converts tokens to money in real time, monthly reconciliation against Stripe, early detection of unprofitable users, and idempotent webhooks.

Gemini API190Niche SaaSCost management2Stripe10Usage-based pricingIndie dev

Premium Article

The problem: you can't tell how much you kept until the month ends

A flat monthly subscription and the Gemini API's per-token cost move to different rhythms. Revenue lands once at the start of the billing cycle; cost creeps up all day, a little with every request. The MRR chart on your dashboard is a tidy set of bars, but how much actually stays in your account is a mystery until month-end. Running a niche SaaS solo, this is the first place you trip.

I run a few small services that embed the Gemini API as an indie developer, and one month revenue was up over the prior month while the balance left in my account was actually down. Tracing it, a handful of top users were burning more than ten times the average tokens, and their cost was eating right through the flat fee they paid. Looking at an overall gross-margin percentage, that "handful of red accounts" stayed invisible to the very end. Since then I put a per-user cost metering layer in first.

This article walks through the implementation that kills the mismatch, in order: meter, reconcile, detect, and stay idempotent. It's not a story about a million yen a month — it's about keeping a few-thousand-dollar service profitable.

Why revenue and cost drift apart structurally

The drift has three sources.

First, different time axes. Stripe's invoice.paid fires once a month; Gemini API billing accrues by the second. Revenue posts at the start while cost lags behind, so the first half of the month looks more profitable than it is.

Second, variance across users. Flat pricing assumes everyone uses an average amount, but AI features are extreme: the gap between heavy and light users is enormous. A single decile of users running 3x the median is enough to push average cost sharply up.

Third, different units and granularity. Gemini bills in tokens (with separate rates for input, output, and cached input); Stripe bills a settled amount in yen or dollars. To compare the two you need a layer that translates tokens into your service's currency.

The metering layer and monthly reconciliation below absorb all three.

Thank you for reading this far.

Continue Reading

What follows includes implementation code, benchmarks, and practical content we hope you'll find useful. This site runs without ads — server and development costs are supported entirely by members like you. If it's been helpful, we'd be truly grateful for your support.

WHAT YOU'LL LEARN
A metering layer that accrues per-user Gemini API cost in real time and converts token usage to money immediately
Reconciliation logic that lines up Stripe revenue against API cost each month to surface unprofitable users early
An idempotent webhook that prevents double-counting invoice.paid, plus a budget guard that stops cost before it spikes
Secure payment via Stripe · Cancel anytime

Unlock This Article

Get full access to the rest of this article. Buy once, read anytime. This site is ad-free — your support goes directly toward keeping it running.

or
Unlock all articles with Membership →
Share

Thank You for Reading

Gemini Lab is ad-free, supported entirely by members like you. We publish practical guides daily with implementation code, benchmarks, and production-ready patterns. If you've found it useful, we'd love to have you on board.

  • Copy-paste ready implementation code
  • New advanced guides published daily
  • $5/mo or $10 for lifetime access
View Membership →

Related Articles

API / SDK2026-06-26
When your Gemini API spend cap trips, paying users go down too — isolating the blast radius with per-tier projects
A Project Spend Cap stops the entire project at once. To keep a runaway free tier from taking paying users down with it, this is a design note on isolating the cap's blast radius across per-tier projects and closing the ~10-minute delay with an application-side soft budget gate.
API / SDK2026-05-03
Building a Subscription SaaS on Gemini API and Cloudflare Workers — A Complete 2026 Implementation Guide
An end-to-end implementation guide for shipping a subscription SaaS on Gemini API, Stripe, and Cloudflare Workers — including model tier switching, KV-based access control, rate limiting, and the production edge cases that always show up.
API / SDK2026-05-02
A Gemini API Monetization Roadmap for Solo Developers — Apps and Billing Funnels Built Around Multimodal
How does a solo developer turn Gemini's multimodal capabilities into actual revenue? This deep dive covers app architecture, billing funnels, Stripe integration, and operational lessons — every layer with implementable code.
📚RECOMMENDED BOOKS
Build a Large Language Model (From Scratch)
Sebastian Raschka
LLM Dev
Prompt Engineering for LLMs
Berryman & Ziegler
Prompting
AI Engineering
Chip Huyen
AI Eng
* Contains affiliate links
See all →