GEMINI LABJP
DESKTOP — Gemini now has a Windows desktop app. It runs on Windows 10 and later, and Alt + Space brings it up from anywhere0.59.0 — This is the current stable Gemini CLI. Versions 0.60 and 0.61 exist only as nightly and preview builds, with no stable tag yetSEPT 30 — Sixteen days left before gemini-omni-flash-preview shuts down. Its successor adds a resolution field to video_config, so swapping the model ID may not be enough429 — Passing an external image or PDF URL through fileData keeps returning 429 for some users at 0.03% of quota. The same request succeeds with text aloneNEW — We edited a draft in Drive, asked again, and Gemini answered from the version before the edit. Here is how its file intake behaves and when to re-attachSAFETY — When translating fiction keeps hitting PROHIBITED_CONTENT, some cases clear with a lower threshold and some never will. Telling the two apart first saves the afternoonDESKTOP — Gemini now has a Windows desktop app. It runs on Windows 10 and later, and Alt + Space brings it up from anywhere0.59.0 — This is the current stable Gemini CLI. Versions 0.60 and 0.61 exist only as nightly and preview builds, with no stable tag yetSEPT 30 — Sixteen days left before gemini-omni-flash-preview shuts down. Its successor adds a resolution field to video_config, so swapping the model ID may not be enough429 — Passing an external image or PDF URL through fileData keeps returning 429 for some users at 0.03% of quota. The same request succeeds with text aloneNEW — We edited a draft in Drive, asked again, and Gemini answered from the version before the edit. Here is how its file intake behaves and when to re-attachSAFETY — When translating fiction keeps hitting PROHIBITED_CONTENT, some cases clear with a lower threshold and some never will. Telling the two apart first saves the afternoon
Articles/API / SDK
API / SDK/2026-04-02Advanced

How I Cut My Gemini API Bill from ¥52,000 to ¥8,400 a Month — Caching, Model Routing, and the Batch API

A working record of cutting my Gemini API bill from ¥52,000 to ¥8,400 a month. Covers implicit vs. explicit caching, Flash/Pro routing rules, migrating to the Batch API, and a usage_metadata logging setup — with the production code I actually run.

Gemini API240cost optimization8Context Caching5Batch API5operations18

Premium Article

The April Invoice That Made Me Stop

In April 2026, my monthly Gemini API invoice reached ¥52,000.

As an indie developer I run article-summarization pipelines, content-metadata generation for my apps, and a handful of editorial helpers for the sites I maintain. Each job is small. The invoice was what those small jobs added up to.

The unit economics no longer made sense, so I spent two months rebuilding how every call is made. The same features now run at ¥8,400 a month.

This article is a record of what actually worked, in the order it worked, with the code I run in production. One caveat before we start: token prices change, so please check the official Gemini API pricing page for current numbers. I will focus on the structure — what gets cheaper, and by roughly how much — rather than on unit prices that may go stale.

Where the Money Was Actually Going

My first step was not researching optimization techniques. It was decomposing my own bill. Aggregating one week of call logs surfaced three imbalances:

  1. Most input tokens were the same preamble, every time. Style guides and reference material — tens of thousands of identical tokens sent with each request. Roughly 70% of all input tokens were this fixed prefix
  2. Nine out of ten requests went to Pro-class models. Even light tasks like tagging and short summaries were routed to the expensive model "to be safe"
  3. Over 60% of the workload had no real-time requirement. Nightly aggregations and archive jobs were all running through the synchronous API anyway

These three numbers became my priority list. Without that decomposition, you end up applying generic tips in random order instead of attacking your own largest imbalance first. I would budget half a day for log analysis before touching anything else.

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
When implicit caching is enough and where explicit caching quietly costs you more — with the threshold I use in production
A static model-routing approach for Flash and Pro that avoids quality incidents, and how I verified the switch
Batch API migration steps plus a usage_metadata logging implementation that turns token counts into a cost forecast
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 $15 for lifetime access
View Membership →

Related Articles

API / SDK2026-07-06
When Context Caching Didn't Lower My Gemini Bill — Field Notes on Measuring the Real Hit Rate
When Context Caching is enabled but the Gemini API bill barely drops, this field note measures the real hit rate from usage_metadata, separates TTL churn from fragmentation, and walks through a staged recovery.
API / SDK2026-09-01
Your New Gemini API Key Never Took Effect, and Load Order Wasn't the Reason
When several sources supply the same environment variable, swapping your key can leave the old value in place. Here is what four load orders actually produced, and a ledger that records which source won.
API / SDK2026-07-27
Retiring Prompt Assets That Refuse to Die — A Ledger for Paths Static Analysis Cannot See
A prompt I had supposedly consolidated away was still running daily. Here is the retirement ledger I built to cross-check static references, flag defaults, observation windows, model end-of-life dates, and cache effectiveness.
📚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