88Z AI, 24 November — Google AI Studio announces native file slicing controls in the Gemini API, allowing developers to specify targeted pages, cell ranges, or time segments for server-side processing of PDFs, Office files, spreadsheets, and media. This enables a "skim-then-zoom" workflow where billing applies only to inspected content, significantly reducing token costs for large files. Partner tests report token usage reductions of 67% for PDFs and 33% for workbooks.
At a glance
- Gemini API now supports native file slicing, allowing targeted processing of specific parts of PDFs, Office docs, spreadsheets, and media
- Adopts a "skim-then-zoom" strategy where billing applies only to inspected content, significantly reducing token costs
- Partner tests show 67% token reduction for PDFs and 33% for spreadsheets; Vercel reports 14x fewer tokens for text extraction vs full rendering
- File URIs are reusable across multi-turn conversations for precise control, subject to 48-hour retention and overall upload limits
Core Feature: From Full Parsing to On-Demand Slicing
Previously, handling large PDFs, slide decks, or multi-tab workbooks required developers to run tools like LibreOffice, PDF renderers, or ffmpeg on the client side to extract content. This increased local memory load and sent irrelevant data to the model. The Gemini API now introduces native file slicing controls, supporting server-side slicing, rendering, and tokenization. Developers can upload a file once via the Files API to get a URI, then reuse it across turns or tool calls, precisely specifying page ranges, spreadsheet cells, or media segments for inspection. This ensures context focuses strictly on relevant parts, with billing applied only to what Gemini actually processes.
Technical Implementation and Multimodal Support
This feature works across all Gemini 4 and newer models. For documents and slides (PDF, Office, OpenDocument), users can set start/end pages, resolution (low/medium/high), and content layers (text or image). Spreadsheets allow selecting specific sheet tabs and visible cell ranges, distinguishing between data, formulas, and visuals. Video processing supports clipping time intervals, adjusting FPS and resolution, and choosing layers like transcripts, frames, or audio; audio supports simple time interval clipping. If no options are specified, defaults apply based on the model family, such as medium-resolution images for Gemini 4+ or flat per-page counts for Gemini 2.5. Note that while only parts are processed, the uploaded file must still meet overall size and page limits, and Files API retention is 48 hours.
Best Practices: The "Skim-Then-Zoom" Workflow
Google recommends a layered approach to optimize costs. First, "skim" the entire document by extracting text or using low-res previews to locate key information. Once the target area is identified, reuse the same file URI to "zoom in" on specific pages or high-resolution images. For example, when processing a quarterly report, extract text to find the page with a revenue bridge chart, then request only that page's high-res image for analysis. This avoids paying for the entire document while ensuring precision. Code examples show how configuring `processing` parameters with `page_options` and `content_layers` enables this flow easily.
Performance Impact and Partner Validation
According to partner data shared by Google, granular control yields significant token savings. Vercel reported that extracting text from a page used 14x fewer tokens than rendering the whole PDF. LiteLLM’s tests showed that since most users need only a few pages or one sheet, pointing Gemini at exact slices reduced prompt tokens by 67% for PDFs and 33% for workbooks. These optimizations occur directly in production harnesses without extra client setup. For Gemini 4 models, token consumption varies greatly by resolution: ~280 tokens/page for low, 560 for medium, and 1,120 for high, making resolution choice critical for cost management.
88Z perspective
This update marks a shift from "bulk feeding" to "precise interaction" in multimodal LLM applications. For enterprise use, native slicing eliminates the need for complex local file-processing sandboxes, reducing engineering overhead. However, developers must note indexing differences (e.g., 1-based indexing for pages/sheets) and be aware of default behavior changes across model families. While token costs drop significantly, frequent Files API calls and managing file lifecycles (48-hour expiry) will become new operational priorities. Teams should refactor existing RAG or Agent architectures to move file preprocessing logic to the API side, leveraging server-side rendering advantages.
Sources & editorial note
This article is an AI-assisted synthesis by 88Z AI based on the public sources below. Product claims and availability are attributed to their publishers. It does not represent independent testing or first-hand reporting.
- @GoogleAIStudioSource published
Source dates above refer to the original announcements; the date under the headline is this article’s publication on 88Z AI.