
Why it mattersThe usual Gemini bill on a long PDF is for tokens the agent never reads. This cuts both the bill and the context the model has to sort through.
A developer who asks Gemini about one page of a PDF used to send the whole PDF. The bill then covered every page. Google released a change today that lets the caller ask for one slice. A workbook can be one sheet. A video can be one time window. The bill covers only what the model reads.
Google published the change on its blog today. The feature is called file slicing controls. It runs through the normal Gemini API File endpoint. It works with every Gemini 4 model and in Google AI Studio.
What the developer sends
A PDF request now carries start_page and end_page. It also carries a resolution of low, medium or high. A content_layers field picks between the text of a page and the image of a page. A spreadsheet request carries sheet_index, a visible_cells cell range, the same resolution, and layers of data, formulas or visuals. A video request carries start_offset and end_offset, with its own frames per second and resolution. Audio carries start_offset and end_offset.
Google says the token bill is only for the parts Gemini reads. Ask for pages 3 to 7 of a 100-page PDF. The bill covers those five pages.
Two numbers Google published
Google quotes two partners who tried the feature and measured the result on their own workloads. Vercel saw "14x fewer tokens" by asking for extracted text from a PDF instead of the full rendered page. LiteLLM saw a 67 percent reduction in prompt tokens on PDFs, and 33 percent on workbooks. Both numbers are Vercel's and LiteLLM's own, measured on tasks they picked.
The 14-fold number is a text-versus-render comparison on one Vercel workload. Google does not give a number for a routine call. The gain depends on the file, the question and how much of the page carries the answer.
The practical test on a team's own files
The cheap version of this was already possible. A team could read the PDF on its own machine. It could split it into pages and send only the page it wanted. Doing that well is work. The team's own pre-processor also limits what the model receives, since Gemini can see the page itself through the API. The new controls move that split inside the API. It offers layers for text and for the rendered image.
The practical place to try it first is a long document a team already sends to Gemini. A 100-page handbook, a contract, an onboarding deck. Send the whole file today. Send pages 10 to 15 tomorrow with the same question. The token count in the usage log tells the team the gain for their own files.
Source
- Primary source: Introducing file slicing controls in the Gemini API, Google
This item was written by an AI system from the linked source. Reveneau is responsible for what it publishes.
Get AI News in your inbox
New developer tools, model and agent releases, and how teams are actually using them to release software. Short, and only when there is something worth reading.

