Google is making it easier and more cost-effective for developers to build AI agents that work with large documents, spreadsheets, and multimedia files. The company has introduced native file slicing controls in the Gemini API, allowing developers to tell Gemini exactly which pages, spreadsheet ranges, video segments, or audio portions to process instead of sending entire files through the model.
Announced on November 23, the update brings server-side file processing to the Gemini API, helping developers reduce unnecessary token consumption while keeping relevant information available to their AI applications.
The feature is particularly useful for applications that regularly process lengthy PDF reports, complex spreadsheets, presentation decks, and long video recordings. Rather than loading an entire file into the model’s context, developers can now select the specific portions they want Gemini to inspect.
Gemini can now inspect specific sections of large files
The new file slicing controls let developers upload a file once through the Files API and reuse its URI across multiple conversations and tool calls. They can then specify which parts of that file Gemini should process.
For documents and presentations, developers can select individual pages or page ranges, choose between low, medium, and high resolution, and determine whether Gemini should process extracted text or page images.
Spreadsheet processing is similarly flexible. The API supports Excel and OpenDocument spreadsheet formats, allowing developers to select individual worksheet tabs, specify visible cell ranges, and choose which content layers to include. These can include spreadsheet data, formulas, and visual elements.
Video processing gets controls for selecting specific time intervals, adjusting frame rates and resolution, and choosing whether Gemini should analyze transcripts, video frames, or audio.
Audio files can also be sliced using specific start and end timestamps, making it possible to process only the relevant portions of a recording.
This approach gives developers more control over how much information enters the model’s context and, consequently, how many tokens are consumed.
Server-side processing removes the need for local file rendering
One of the more interesting aspects of this announcement is that Google is handling the slicing, rendering, and tokenization directly on its servers.
Previously, developers building AI agents that needed to inspect portions of large files often had to rely on additional tools such as LibreOffice, PDF renderers, and FFmpeg. These tools could introduce additional memory requirements, consume local storage, and require developers to maintain separate processing environments.
With native file slicing, developers can pass a Files API URI directly through a user request or a function response. Gemini then handles the necessary file processing server-side.
Google also supports a more economical two-stage workflow. Developers can initially inspect an entire document using extracted text, low-resolution previews, or transcripts to identify relevant sections. Once the target information is located, they can request higher-resolution processing of only the pages, charts, or video frames that need closer examination.
This is particularly useful for AI agents working with financial reports, research documents, business presentations, and other information-heavy files.
Google shares early token savings from developers
Google says early adopters have already validated the benefits of native file slicing in production environments.
Vercel reported that skimming a document using text extraction required 14 times fewer tokens than rendering the entire PDF.
LiteLLM also shared encouraging results from its testing. According to the company, targeted file slicing reduced prompt token consumption by 67% when processing a PDF and 33% when processing a spreadsheet workbook.
These figures demonstrate why controlling the amount of information sent to an AI model can make a meaningful difference, particularly in applications that repeatedly analyze large files.
Actual savings will depend on file formats, processing settings, and how much content an application needs to inspect.
Availability and supported Gemini models
Google says native file slicing controls work across all Gemini 4 models, with existing file size and page limits continuing to apply to uploaded files.
The feature is available through the Gemini API in Google AI Studio and the Gemini platform. Alongside file slicing, Google has also expanded native file upload support to Microsoft Office and OpenDocument formats.
Developers can get started using the official Gemini API documentation.
For developers building multimodal AI applications and autonomous agents, the update addresses a practical challenge: processing large files without paying to send every page, spreadsheet cell, or video frame into the model unnecessarily. Instead of treating an entire file as a single block of information, Gemini can now focus on the exact content an application needs.
Discover more from GadgetBond
Subscribe to get the latest posts sent to your email.
