Google adds server-side file slicing to the Gemini API | Magica
Google shifts Gemini file slicing to its servers; savings depend on selection
Editorial Team
••📖7 min read
Google’s Gemini API can slice documents, spreadsheets and recordings on its servers and bill for selected content sent to the model. The controls reduce local preparation work, but upload limits, model defaults and the cost of finding relevant material qualify the savings.
Gemini can process selected file ranges and content layers on Google’s servers, billing only for the selected output sent to the model.
Existing upload limits remain; developers must explicitly choose narrower processing to avoid whole-file defaults.
Partner tests show substantial input-token reductions, but do not establish savings for every workflow.
Google is moving more file preparation into the Gemini API, its developer interface for applications using Google’s AI models. In a November 23, 2026 announcement, the company described server-side controls for selecting document pages, spreadsheet cells and recording segments, alongside native Microsoft Office and OpenDocument uploads.
The change matters for software agents that repeatedly consult large files: a request for one chart or worksheet can become a targeted inspection instead of another full-file input. Google says the API performs the slicing, rendering and tokenization itself, reducing the preparation software developers need to operate around the model. Its announcement says the controls are available through the API in Google AI Studio and the Gemini platform.
Google’s announcement graphic for Gemini API file-slicing controls. Image: Google. Source: Google.
A new control layer with an earlier history
The announcement is broader than a first introduction of file handling. Google’s release notes already list multimodal file processing and slicing under November 18, five days before the blog post. They also record expanded Office and OpenDocument support on November 5, including PPT, ODP and ODS inputs, and video clipping and configurable frame sampling on May 20, 2025.
Those entries qualify the novelty. Google is extending and bringing together ways to control file inspection within the API, rather than introducing document understanding or video clipping for the first time. Its API has supported PDF processing since August 2024.
Google says native slicing works across all Gemini 4 models. Its document reference gives a broader compatibility statement for document, presentation and spreadsheet controls: they work across Gemini 3 and Gemini 4 or later models, both in user input and in results returned by tools.
Jensen Huang’s return as Nvidia CEO leaves December congressional questioning intact. Lawmakers want evidence behind the board’s security assurance and answers about chip exports and the administration’s involvement.
Editorial Team
Choosing what the model sees
Developers can upload a file once through the Files API, then reuse its URI—a reference to the stored file—across requests and tool calls. The document reference says Gemini automatically receives page counts and worksheet names, allowing follow-up requests for narrower ranges. Files API uploads are stored for 48 hours; the upload service is available at no cost where the Gemini API is offered, separate from model processing charges.
For documents and presentations, developers can select inclusive page ranges and ask for extracted text, rendered page images or both. Spreadsheets can be narrowed to a worksheet and an A1-style cell range, with separate choices for evaluated values, raw formulas and a visual rendering of the sheet.
These distinctions affect what evidence the model receives. A text pass can locate a section cheaply, while a later image pass can inspect a chart or dense layout. Spreadsheet values and raw formulas answer different questions; a rendered sheet supplies visual context absent from either.
Omitting processing options still loads the full file: Gemini 4 defaults include page or slide images for documents and presentations, and values, formulas and sheet names across spreadsheet tabs. Model choice changes that baseline too. For DOCX, DOTX, ODT and PPTX files, Gemini 3 and 2.5 defaults use extracted text plus embedded images, while Gemini 4 uses medium-resolution page images. A cost comparison must therefore account for changes in representation as well as file ranges.
For static video processing, the video reference permits time intervals, sampling rates up to 24 frames per second, and combinations of frames, audio and a timestamped transcript. The default includes frames and audio at one frame per second, which Google warns can miss rapid motion or quick scene changes. Transcripts are billed as text, while raw audio uses audio token rates. The audio reference similarly allows time ranges and says only the clipped duration is billed.
Selective inspection also has a precedent inside Gemini’s video system. Google introduced agentic video understanding in September 2026, letting supported models navigate recordings and load material on demand. That is a different choice from explicitly configuring a static slice: Google warns that agentic navigation adds reasoning and tool-call overhead, which can increase latency and total token usage for short clips or broad questions.
Company-reported LiteLLM input-token counts. Selections: PDF pages 3–4, workbook sheet 2, presentation slide 2 as text, video seconds 10–20 and audio seconds 60–90. These tests do not establish equivalent answer quality or total workflow savings. Chart: Magica. Source: LiteLLM.
Savings depend on the slice
Google estimates that page images on Gemini 3 and Gemini 4 consume approximately 280 tokens at low resolution, 560 at medium and 1,120 at high. On those estimates, high resolution uses four times the page-image tokens of low resolution. Resolution is therefore a budget decision as well as a readability setting.
LiteLLM, a proxy that routes application requests to model APIs, supplies a more concrete but limited comparison. Its integration documentation reports the following input-token counts using Gemini 4 Hydrogen and LiteLLM version 1.110.2. Direct Google requests and all three tested Gemini proxy routes returned matching counts.
Test file
Whole-file input tokens
Selected input
Slice input tokens
Reported reduction
Six-page PDF
5,840
Pages 3–4
1,147
80%
Three-sheet workbook
1,008
Sheet 2
391
61%
Same workbook
1,008
Sheet 1, cells A1:B3
173
83%
Three-slide presentation
1,704
Slide 2, text layer
73
96%
60-second video
6,159
Seconds 10–20
1,059
83%
120-second audio
3,879
Seconds 60–90
999
74%
Each reduction compares a selected request with the whole-file request for that test file. These are input-token comparisons, not measurements of total application cost or proof of equivalent answer quality. Selecting a text layer instead of rendering a whole presentation changes both the quantity and representation of the input.
The model’s commercial context matters too. Google’s release notes identify Gemini 4 Hydrogen as a generally available model released November 12 for coding and agent workflows, with free-tier access and paid-tier prices of $1.50 per million input tokens and $7.50 per million output tokens. Additional discovery passes and generated answers also matter to a workflow’s final bill; a percentage reduction in one input is not a percentage reduction in the entire bill.
A separate account attributes different test reductions to LiteLLM—67% for a PDF and 33% for a workbook—without the detailed inputs shown in its integration reference. Those figures cannot be treated as the same benchmark. Neither account supports a universal savings rate.
The proxy documentation also limits the integration claim: it covers routes using Gemini’s native request formats, passing the slicing fields through unchanged. It does not document slicing through the OpenAI-compatible chat-completions route.
What developers still need to measure
Google’s infrastructure takes over work that its announcement says otherwise requires tools such as LibreOffice, PDF renderers and ffmpeg in an agent’s execution environment. That can simplify the developer’s file-processing stack. Local preparation remains an alternative; the announcement does not compare its full operating cost with Google’s service.
Slicing does not remove document upload ceilings. The document reference retains limits of 50 MB per file, 1,000 pages per PDF, 2,000 pages or slides per Office or OpenDocument file, and 50,000 cells per spreadsheet sheet. The whole uploaded document must meet the applicable limits even when only a small slice is requested.
Recordings have separate constraints. The video reference lists Files API uploads of up to 20 GB on the paid tier and 2 GB on the free tier; how much video can be processed also depends on the model’s context window and media resolution. The audio reference sets a maximum of 9.5 hours per prompt. The document ceiling is not a universal limit for every file type.
The remaining decision is how aggressively to narrow the input, and how much selection to delegate to an agent. A useful evaluation must measure the full sequence—finding relevant material, inspecting it and producing an answer—including latency, total charges and relevant evidence missed. The reported token counts demonstrate smaller inputs. Reliable selection across real documents and recordings is the evidence still needed to establish dependable workflow savings.
The Commerce Department added Singapore-based Megaspeed to its Entity List, imposing a licensing barrier on supplies to a longstanding Nvidia customer while allegations of chip diversion remain unresolved.
Google is rolling out optional Wallet access in Search’s AI Mode, with Drive and Gemini connections to follow. The expansion brings existing personal-finance capabilities into Search, while data-use permissions extend beyond the read-only limit on financial actions.
Anthropic has launched Claude Ship for GitHub repositories, combining code review with new agents that fix problems and apply approval policies. Teams retain control through repository rules, while automation adds token costs and can allow changes to merge without human review.
Google’s patent application describes generating videos from viewing habits, demographics and device context, with optional replicas of the viewer and inserted ads. Existing video tools show parts of the idea are already available; a commercial service and its economics remain unproven.
OpenAI's OpenWorks pilot offers free AI assistance to eligible small businesses in 20 U.S. communities, pairing paid local partners with a three-month ChatGPT Business trial. It builds on earlier training efforts, but its total budget is undisclosed and typical business returns are unproven.
Nothing plans to unveil Ear (note) on December 8, pairing call-recording earbuds with a case that captures meetings for AI transcription. Existing recording products, uncertain service costs and unresolved privacy details narrow the novelty of the pitch.
Anthropic’s Enterprise Frontier Safeguards beta lets eligible businesses use its most capable Claude models while keeping encrypted safety records in their own cloud accounts. Automated monitoring remains; customers pay cloud costs and review flagged cases.
Hakeem Jeffries promised an investigation after Nvidia reinstated Jensen Huang following Donald Trump’s intervention. Reports that directors excluded interim CEO Colette Kress sharpen questions about the reversal and its national security assurances.
The European Commission has confirmed a leak affecting users of its public learning platform, while the number affected, the wider exposure of staff data and responsibility for the attack remain unresolved.
Maintainers defend continued distribution of the AI penetration-testing framework after its creator withdrew it. Investigations document data theft and cheap automation, but also failed payouts, blocked attacks and safeguards that vary by version.
China Telecom's AI arm has released the 285-billion-parameter Xing4.1-Preview under Apache 2.0, extending its TeleChat model lineage and domestic-compute strategy. Its million-token context and quantized variants widen deployment choices, but mixed benchmarks and incomplete cost disclosures leave its low-cost pitch unproven.
Applied Digital signed an 18-year lease for 150 MW with an unnamed investment-grade hyperscaler. Higher pricing strengthens its contracted revenue book, but financing, power arrangements and construction still stand between the agreement and delivery.
Sarvam Dictate combines speech recognition and text editing for English and 22 Indian languages at ₹0.50 per audio minute. Its company-run benchmarks show fewer character edits than rival APIs, but the advantage varies by language and recording length.
Arm CEO Rene Haas will become SoftBank Group vice chairman on December 1, building on existing roles at its controlling shareholder as Arm expands beyond processor licensing into its own chips. The extension follows a reported Nvidia recruitment approach, but Nvidia has since reinstated co-founder Jensen Huang as CEO.
Trump claimed personal credit for Jensen Huang’s reinstatement after Nvidia received government security assurances. The reversal leaves questions about export controls, presidential influence and Trump’s financial stake unresolved.
Sierra’s $1.75 billion Series F follows reported annual recurring revenue above $400 million. Competitors already offer outcome pricing and agents that act on customer accounts, making reliability and delivery costs central to its $30 billion valuation.
The states allege that Grok and X enabled nonconsensual sexualized images while misleading consumers about safeguards. Their consumer-protection cases seek financial penalties and court orders against SpaceX and its subsidiaries.
Founded in May, Marlowe has raised $277 million at a company-reported $1.15 billion valuation to build inference infrastructure using AMD and Etched chips. Its first deployments will test whether engineering across hardware and software can deliver its promised efficiency gains.
Amazon has agreed to buy Decart’s optimization technology and recruit its founders and engineers after working together on Trainium since 2025. Reports value the deal at $7.5 billion or more, with deferred payments and five-year retention commitments; Amazon has disclosed neither a price nor quantified savings.