Gemini API file slicing: how to use it and what it costs
2026-11-24 · 4 min read
Gemini API file slicing is a new set of controls that tells Gemini to load only part of an uploaded file: a page range of a PDF, a block of cells in a spreadsheet, or a stretch of a video. You upload the file once, name the slice in your request, and pay tokens for that slice only. Google shipped it on November 23.
What Google posted
The announcement came as an X Article from @GoogleAIStudio, which says "Native file slicing works across all Gemini 4 models." The slicing happens on Google's servers, so you don't need to run a PDF renderer or ffmpeg yourself before calling the API.
Half an hour later @googledevs posted the short version with a demo clip. You upload a file once through the Files API and can slice it differently on every turn, so a model can skim a document cheaply and then zoom in on the pages that matter at high resolution. The post says it is available now through the API in Google AI Studio and the Gemini platform.
Google's blog post adds a second change. The API now reads Word, PowerPoint, Excel and OpenDocument files directly, so you can skip the convert-to-PDF step.
What you can slice
| File type | Controls | What they do |
|---|---|---|
| PDFs, documents, slides | start_page, end_page, content_layers, resolution |
Pick a page range, choose page text or page images, set low, medium or high detail |
| Spreadsheets | sheet_index, visible_cells, content_layers |
Pick one tab and an A1-style range like A1:H50, then choose values, formulas or a rendered snapshot |
| Video | start_offset, end_offset, fps, resolution |
Send one time window, as transcript, frames or audio |
| Audio | start_offset, end_offset |
Send one clip |
One detail differs between sources. The X posts say Gemini 4 models. Google's docs say the document and spreadsheet controls also work on Gemini 3.
What it costs
There is no new fee. The docs give the per-page token cost on Gemini 3 and 4: about 280 tokens at low resolution, 560 at medium (the default) and 1,120 at high. The Files API itself is free, and uploads are kept for 48 hours.
Take a 200-page contract. Loading the whole thing at medium detail is about 112,000 input tokens, and loading pages 3 through 7 at high detail is about 5,600. I worked that out from the docs' per-page figures. Google didn't publish it.
Google doesn't promise a savings percentage. The blog quotes two partners instead: Vercel saw 14 times fewer tokens when it text-skimmed a page compared with rendering the whole PDF, and LiteLLM measured 67% fewer prompt tokens on a PDF and 33% fewer on a workbook. At least one headline turned that into a flat "93%", a figure I couldn't find in Google's post or the docs.
The limits apply to the full file even when you slice it: 50 MB per file, 1,000 pages per PDF, 2,000 pages or slides per Office file, and 50,000 cells per sheet.
How to try it
- Get an API key in Google AI Studio and upload your file with the Files API.
- Call the Interactions API with a Gemini 4 model. Google's example uses
gemini-4-hydrogenfor the cheap first pass andgemini-4-neonfor the close read. - Add a
processingblock to the document, like the one below. - Compare the input token count against the same request without slicing.
The document block follows this shape, taken from Google's docs example:
{
"type": "document",
"uri": uploaded_file.uri,
"mime_type": "application/pdf",
"resolution": "high",
"processing": {
"type": "static",
"page_options": {
"start_page": 3,
"end_page": 7,
"content_layers": ["page_image"],
},
},
}
For a spreadsheet, swap page_options for spreadsheet_options with sheet_index and visible_cells. Page numbers and sheet positions start at 1. The model is told the total page count and the worksheet names automatically, so an agent can decide for itself which slice to ask for next.
My read
This is a small feature that I think will show up on a lot of bills. Most document automation sends the whole file every time because cutting it up locally is a chore, so a 90-page lease goes in when the question is about the renewal clause on page 12. If the model skims as text first and then reads only the few pages that matter as images, each question gets much cheaper.
It also fits how the lineup is priced. Run the skim on Gemini 4 Hydrogen and save Gemini 4 Neon for the pages worth a careful look. Anthropic went a different way last month when it raised the Claude API request limit to 128 MB, which lets you send bigger files. Google's answer is to send less of each one.
The savings depend on knowing where to look, though. If your workflow needs every page, slicing won't save you anything.
What this means for a small business
Reading invoices, leases, bid packets and inspection reports is where most small firms would use AI first, and the per-document cost just came down. If you have a stack of paperwork that someone retypes every week, New Face Design's free process audit will tell you whether it is worth automating and roughly what it would cost to run.