◉GEMINI LABJP
●TTS — Gemini 3.8 Flash TTS and Flash-Lite TTS are GA as of September 22. Voice replication works on Flash only; Flash-Lite returns a 400●2.5 — Access to the 2.5 models is now limited to accounts with prior active usage (September 18). Not a deprecation: new projects should start on 3.5 Flash-Lite or 3.8 Flash●9/30 — Two days until gemini-omni-flash-preview shuts down, and gemini-2.5-flash-image follows on October 2. In practice the replacement for the latter is gemini-3.1-flash-image●AUTH — Reports continue of Gemini CLI sign-in failing only for Workspace Enterprise accounts while personal accounts work. Isolating the two is the current focus●NEW — Moving to 3.8 Flash-Lite TTS meant re-picking the voice for our guidance audio●429 — A brand-new project shows Free tier yet returns 429 with limit: 0. Here is what to check in the first hour●TTS — Gemini 3.8 Flash TTS and Flash-Lite TTS are GA as of September 22. Voice replication works on Flash only; Flash-Lite returns a 400●2.5 — Access to the 2.5 models is now limited to accounts with prior active usage (September 18). Not a deprecation: new projects should start on 3.5 Flash-Lite or 3.8 Flash●9/30 — Two days until gemini-omni-flash-preview shuts down, and gemini-2.5-flash-image follows on October 2. In practice the replacement for the latter is gemini-3.1-flash-image●AUTH — Reports continue of Gemini CLI sign-in failing only for Workspace Enterprise accounts while personal accounts work. Isolating the two is the current focus●NEW — Moving to 3.8 Flash-Lite TTS meant re-picking the voice for our guidance audio●429 — A brand-new project shows Free tier yet returns 429 with limit: 0. Here is what to check in the first hour
Articles/API / SDK
◈ API / SDK/2026-09-29Beginner

The Size Column Said 'F6' and 'About A4' — I Let Gemini Read It, and Let a Table Do the Math

An artist's spreadsheet mixed 'F6', '41×31.8cm', and 'about A4' in one size column. Here is the small tool I built: Gemini reads each cell, a lookup table converts to centimeters, and the artwork image decides the orientation. Working code, step by step.

Gemini API244structured output9Pydantic2client workindie development28

✦ Premium Article

The artist's spreadsheet arrived on a Tuesday afternoon, and I read the size column from top to bottom before I touched anything else. I maintain the official site for a mandala artist as client work, and the site is built so that this one spreadsheet is the source of truth: new pieces, price changes, sold-out flags, all of it flows from the ledger. Title, price, availability — those columns could be pasted straight through.

The size column could not. "F6" sat next to "41×31.8cm", which sat above "about A4", which sat above "30cm square". To the artist these are all the same kind of statement. To me they were four different formats.

The site has exactly one field: width × height in centimeters. Fixing forty rows by hand takes an hour, and the next delivery brings the same hour back. So I decided to write a small tool around the Gemini API — but only after drawing one line first.

The first thing I want to say: I did not ask the model to convert

My first version was the obvious one. I handed each string to the model and asked for centimeters. The numbers that came back looked right, and most of them were right. The trouble was that a wrong row looked exactly like a right row. Whether "F8" came back as 45.5 × 38.0 or 45.5 × 39.0, I could not tell without opening the canvas-size chart and checking by hand. If I have to check forty rows every time, I may as well have typed them myself.

So I changed what I was asking for, from conversion to reading. Is this string a canvas size, a paper size, centimeters written out, or something the model cannot classify? That is where the model's job ends. The conversion to centimeters comes from a lookup table on my side, and a table has no way to be wrong.

Gemini reads, the table converts, the image decides orientation. Because I settled that line before writing anything, the code stayed short.

What was actually in the column

I counted the formats. Roughly, it broke down like this.

FormatExamplesShare (approx.)What it needs
Japanese canvas sizesF6 / F10 / S6about 40%lookup in a canvas table
Centimeters written out41×31.8cm / 30cm squareabout 35%transcribe the numbers as written
Paper sizesA4 / B5about 15%lookup in a paper table
Vagueabout A4 / postcard-sizedabout 10%read it, then flag for review

Within those four, the spelling kept branching: with or without the "号" suffix, full-width versus half-width digits, "×" versus "x" versus "*". I started writing regular expressions, stalled on the third branch, and that was the moment I decided to let the model do the reading.

One piece of preparation comes before any of this. The artist's sheet has a two-row header and a few merged cells, and if you pass it in that shape, the first thing that breaks is the row alignment. I wrote about that separately in Your Spreadsheet Breaks Before Gemini Ever Sees It, so here I will only note that I flatten the sheet to two columns — a row number and the raw size string — before anything reaches the API.

✦

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
✦You will be able to turn a size column that mixes 'F6', 'about A4', and '30cm square' into width and height in centimeters, 40 rows in a single API call
✦You will be able to prevent the hard-to-spot failure where the model converts 39 rows correctly and one row wrongly, by drawing the line between reading and converting before you write any code
✦You will be able to catch dropped or duplicated rows and settle portrait-versus-landscape without asking the model, so the next delivery costs you a few flagged rows instead of an hour of hand edits
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-04-26
Defending Gemini API Responses with Schema Validation — Never Let Unexpected Formats Reach Production
Gemini's structured output is convenient, but in production the day always comes when an unexpected format slips through. This piece walks through layered Zod/Pydantic validation, repair prompts, and graceful degradation — the defense lines I run on my own apps.
◈ API / SDK2026-09-11
When Transcription Keeps Mangling Proper Nouns: Choosing What Earns a Custom Vocabulary Slot
gemini-3.5-transcribe accepts up to 1,000 custom_vocabulary entries, but filling the list is not the goal. Here is a 60-line script that picks entries from your own reference-and-hypothesis pairs, plus the rules I use to decide what to leave out.
◈ API / SDK2026-09-08
Writing my first Gemini cost estimate in two columns, one for now and one for January
Introductory pricing for Gemini Flash ends on December 31, 2026, and standard pricing starts on January 1, 2027. Staying on an older generation does not avoid it. Here is the small, working estimator I use to see both prices at once.
📚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