Gemini API file slicing explained: send the pages that matter, pay only for what Gemini reads

Lede
Until now, giving Gemini a large file usually meant giving it the whole file — every page of the PDF, every sheet of the workbook, every minute of the recording — and paying in tokens for all of it. Google's new file slicing controls, announced on 23 November 2026, change that bargain: developers can now ask for only the slice they need — a page range, a sheet range, a few seconds of video — and tokens are billed only for the parts Gemini actually inspects. It is a small-sounding change with a large practical effect, because the most expensive part of working with big files was never the clever prompt. It was everything around the answer.
What changed
File slicing is built into the Gemini API, available through Google AI Studio and the Gemini platform, and it arrives alongside native upload support for Microsoft Office and OpenDocument formats — so a .docx or .odt no longer needs converting before Gemini can read it. The controls work across all Gemini 4 models, and the post is clear that existing file size and page limits still apply: slicing lets you choose within a file, not smuggle in a bigger one. The slice you request depends on the file. For documents and slides, you name a start and end page, a resolution (low, medium or high) and the content layers you want — the text of the page, the image of the page, or both. For spreadsheets, you name the sheet, choose visible cells, and pick layers for data, formulas or visuals. For video, you name start and end offsets, frames per second and resolution, and choose transcript, frames or audio layers. For audio, you name a time interval. In each case the idea is the same: describe the part, not the file.
Why it matters for cost — and for privacy
The cost effect is direct. Tokens are billed only for the parts Gemini inspects, so a ten-page question inside a 400-page report stops costing like a 400-page question. Google's post includes a worked pattern that shows the intended workflow: skim a document cheaply with one model, then hand the promising slice to a more capable model for detail — its code example uses Gemini 4 Hydrogen for the skim and Gemini 4 Neon for the detail. That pattern is worth copying, because it turns slicing from a billing feature into a design habit: cheap pass first, expensive pass only where it earns its keep. There is a second effect that matters just as much and gets less attention. A slice is also a boundary. When only the relevant pages leave your system, the rest of the file never reaches the model at all — useful for sensitive documents where the whole file should not travel, and for compliance-minded teams that want the smallest possible exposure for each request. Slicing does not replace access control or retention policy, but it gives developers a practical way to send less, which is usually the cheapest privacy measure available.
The numbers Google quotes — and how to read them
Google's post quotes two partner results, and they should be read as partner claims inside Google's post, not as Google's own measurements. Vercel reports 14 times fewer tokens when skimming a document versus rendering the whole PDF. LiteLLM reports 67% fewer prompt tokens for a PDF and 33% fewer for a workbook. Those are encouraging figures from named partners describing their own use, and they are not a promise for every file: a dense, image-heavy PDF will behave differently from a clean text report, and the savings depend entirely on how small a slice answers the question. Treat them as a reason to test with your own files, not as a rate card.
How it fits a real workflow
Files are uploaded once through the Files API, and the resulting URI can be reused across turns and tool calls — so a sliced document can stay in play through a multi-step conversation without being re-sent. That reuse is what makes slicing practical rather than fiddly: upload once, slice differently as the conversation narrows, and pay only for what each step inspects. The natural home for this is document-heavy work — support teams searching manuals, analysts working through filings, legal and research teams pulling answers from long reports — anywhere the file is large and the question is specific.
Bottom line
File slicing rewards a simple discipline: know which part of the file answers the question, ask for that part, and let the rest stay put. Developers building on the Gemini API should try it first on their most common document shape, measure the token difference on their own files, and only then decide how much of their workflow to rebuild around it. The feature is live, the controls are specific, and the savings — like the privacy benefit — scale with how precisely you slice.
Sources
- Google blog post, 23 November 2026 — "Introducing file slicing controls in the Gemini API" (Rohan Doshi and Ben Caine, Google DeepMind). All controls, layer names, model names and partner figures in this article come from that post.
- Gemini API / Files API documentation — for the upload-once, reuse-URI behaviour as described in the post. No figure in this article depends on it beyond what the post states.
Related on AiTopMix
- Gemini 4 Hydrogen: Fast, Cheap AI in Search & the App
- Gemini 4 Neon: Price ($3/$15), Access and How It Compares to Carbon
- Gemini — Pricing & Free Tier (2026) | AiTopMix
- AI Tool Comparisons — 20 Head-to-Head Verdicts | AiTopMix
- Gemini Decisions API explained: 1,000 questions, one call, no generated text
The AiTopMix monthly roundup
One email a month, no spamThe tools and news that actually changed this month, plus the month’s new comparisons — in one short email. No subscriber count is claimed: the list is new, and it grows one reader at a time.