A selective reading to lighten the context of Gemini agents
New controls in the Gemini API target pages, cells, and media sequences to adjust context and billed input tokens.
Browsing the text of a Word report, then examining a graph on a single page in high resolution: that is the scenario Google chose to present its new file-reading controls. The document is uploaded once, then viewed in different forms with the same reference. The application chooses what should go into the model’s context at each step.
The Gemini API update combines this server-side slicing with native support for Microsoft Office and OpenDocument files. PDFs, documents, presentations, spreadsheets, and recordings can be sent with a selection of pages, cells, or time ranges. For this content, the billed input tokens correspond to the excerpts actually sent to the model. Representation matters as much as selection
A page range defines only part of the reading. For a document or presentation, the controls distinguish between extracted text and page images, which preserve formatting. An initial pass can therefore be used to identify a section in the text, before requesting the rendering of a page containing a graph or a dense table. Three resolution levels control the amount of visual detail processed.
The same choice applies to spreadsheets, with adapted representations. A request can target a tab and a range of cells, then ask for calculated values, formulas, or a visual preview to read charts and the sheet layout. With Gemini 4, in the absence of specific options, documents and presentations are processed as page images; spreadsheets provide values, formulas, and sheet names across all tabs.
For video, the time interval can be combined with an image sampling rate, a resolution, and a choice between transcription, images, and audio track. Audio files can also be limited to a sequence. These settings apply to the information analyzed by the model. Conversions leave the agent environment
The shift also affects the infrastructure needed for these reads. Until now, some applications had to run LibreOffice, PDF rendering tools, or ffmpeg in their own environment to convert documents and extract sequences. The service now performs slicing, rendering, and token conversion on Google’s servers.
Files uploaded with the Files API can be referenced across multiple exchanges and tool calls. Selections are accepted in a user message or in a function response, opening progressive reading to agents. The document processing documentation specifies that the model also receives the total number of pages and sheet names so it can then request other ranges.
This selection takes place after the full file has been uploaded. The documented limits remain 50 MB per file, 1,000 pages for a PDF, and 2,000 pages or slides for Office and OpenDocument formats, with a cap of 50,000 cells per spreadsheet. Slicing does not make it possible to bypass these limits. Files uploaded via the Files API are retained for 48 hours, according to the documentation. An economy tied to the reading path
The budget depends on the number of excerpts viewed and the level of detail requested. For page images, Gemini 3 and 4 models use about 280 tokens at low resolution, 560 at medium resolution, and 1,120 at high resolution. These values concern the visual representation of the pages, not the total cost of a request that includes instructions and the response.
The announcement presents the controls across all Gemini 4 models, via Google AI Studio and the Gemini platform. The documentation also extends document, presentation, and spreadsheet selection options to Gemini 3 models. Reusing a file reference avoids uploading it again; the content retained for each reading is still counted.
Testimonials from partners published by Google provide results on specific cases. Vercel reports that a text-extraction pass used fourteen times fewer tokens than rendering the full PDF. LiteLLM reports a 67% reduction in input tokens for a PDF and 33% for a spreadsheet in its tests.