Google Gemini API Cuts Token Costs by Up to 67 Percent with Server-Side File Slicing
On November 23, 2026, Google launched native file-slicing features in the Gemini API alongside direct Google Drive integrations within AI Mode. Developers and business teams no longer need to convert spreadsheets or slide decks locally before sending the entire file to the model. Benchmarks by LiteLLM show a 67 percent reduction in prompt tokens for PDFs and a 33 percent reduction for spreadsheets. In addition, the API now supports server-side rendering of page images across three resolution tiers ranging from 280 to 1,120 tokens per page.
Server-Side Document Slicing in the Gemini API
Until now, large language models generally processed multi-page documents as complete, unified files. Developers had to parse PDF documents, Microsoft Office files, or OpenDocument formats on local infrastructure, split them into text blocks, and send them to the API endpoint through custom scripts. With the update released on November 23, 2026, the Google Files API handles this entire preprocessing step directly on Google servers. Business applications upload a file once and then reference specific sections using a URI. Input tokens are billed exclusively for the exact portions that Gemini actually reads.
For text documents and presentations, the system accepts fixed start and end page numbers. Teams decide whether the API extracts plain text, renders visual page images, or combines both formats. For spreadsheets, parameters define the selection using sheet indices and cell ranges in standard A1 notation. Developers can request computed values, raw formulas, or rendered chart views. This workflow removes computation overhead from local application servers and accelerates agent-driven document queries.
Token Measurements and Visual Resolution Tiers
Initial production benchmarks illustrate the financial impact of this updated API architecture. Integration framework LiteLLM recorded a 67 percent drop in prompt tokens during test runs with PDF documents. For complex spreadsheets evaluated in the same setup, token consumption fell by 33 percent. Vercel observed in production environments that retrieving plain text to skim a document page uses 14 times fewer tokens than rendering the entire PDF file visually. These operational differences make document processing costs predictable for recurring business workflows.
Google has set fixed token counts for visual page images across Gemini 3 and Gemini 4 models. A page rendered in low resolution consumes around 280 tokens, while medium resolution requires 560 tokens. For dense spreadsheet layouts or detailed diagrams, a high-resolution tier is available at 1,120 tokens per page. Teams can run initial document scans on raw text to locate relevant passages, pulling high-resolution images only for specific target pages. If an API request omits explicit slicing parameters, Gemini defaults to medium resolution or processes entire worksheets.
| Processing Mode | Supported Formats | Token Consumption / Billing | Typical Use Case |
|---|---|---|---|
| Text Skim (Server Slicing) | PDF, Office, OpenDocument | Minimal token demand (roughly 14x fewer tokens than full image rendering) | Fast scanning of tables of contents and raw text passages |
| Page Image (Low Resolution) | PDF, Word, Presentations | Approximately 280 tokens per rendered page | Rough checks of visual layouts and simple text documents |
| Page Image (High Resolution) | PDF, Excel, Slide Formats | Approximately 1,120 tokens per rendered page | Detailed inspection of financial tables, complex diagrams, and blueprints |
Technical Limits and Retention Rules in the Files API
Even with granular slicing controls, the standard boundaries of the Google Files API remain in place. The maximum file size is capped at 50 MB per upload. PDF documents may contain up to 1,000 pages, while Office and OpenDocument files can include up to 2,000 pages or presentation slides. Spreadsheets are limited to 50,000 cells per worksheet. Uploaded files remain stored on temporary platform storage for exactly 48 hours before automated systems delete them.
The Files API itself incurs no additional infrastructure fees in regions where the Gemini API is supported. Billing applies solely to the tokens processed by the model for the requested file segments. Document URIs can be reused across multi-turn conversations and agentic function calls. Once a file is registered, the system returns document metadata such as sheet names and total page counts. Software agents can inspect this metadata to determine autonomously which page ranges to load for deeper analysis.
Drive Integration in Google Search AI Mode
Alongside developer API updates, Google is expanding end-user capabilities within search. AI Mode in Google Search now connects directly to Google Drive and Google Wallet through its Personal Intelligence layer. Previously, this access was limited to Gmail, Google Calendar, and Google Photos. Users can pull distributed information from saved documents and spreadsheets straight into the search interface to draft proposals or summarize status reports. This connection remains optional and can be turned off in privacy settings at any time.
Google maintains strict boundaries around Google Wallet data. AI Mode only reads stored account information or loyalty point balances, and it cannot initiate payments or change account balances. Teams also benefit from shared context between the mobile Gemini app and AI Mode. Research initiated in the Gemini mobile application is automatically accessible in desktop search without retyping prompts. Google displays a dedicated personalization badge below generated responses whenever internal account sources are used.
Three Implementation Steps for Sales, Marketing, and Project Teams
Sales teams should transition automated proposal and tender reviews to a two-step API pipeline. First, an automated script scans the table of contents and raw text of a 200-page tender document using minimal tokens. Once the system identifies the relevant scope requirements on pages 45 through 52, the application requests high-resolution visual page images to inspect complex pricing matrices. This phased process avoids token spend on non-matching tenders and accelerates lead qualification.
Marketing and project managers must structure file storage inside Google Drive deliberately. Spreadsheets tracking campaign analytics or project roadmaps need clear worksheet labels and consistent header rows. Because Gemini reads sheet names on the server side, project assistants can open budget verification tabs directly without ingesting historical working drafts. Storing source documents as native Office or OpenDocument files in Drive also eliminates time-consuming manual PDF export steps.
IT administrators must establish clear workflows around the 48-hour retention limit of the Files API. Because uploaded files expire after two days, recurring monthly reporting jobs must either re-upload assets or point to permanent storage endpoints. Security officers should also audit which internal user groups have access to Personal Intelligence features in Google AI Mode. For confidential financial data, managed API integrations with programmatic cleanup policies provide greater control than open search assistants.
In our practice: Choosing between a unified platform and a custom API integration
In dealcode AI, teams process documents through a central platform that pairs unlimited user seats at 0 EUR fixed seat license costs and 0 EUR mandatory setup fees with usage-based billing from 0.156 EUR to 0.130 EUR per credit (pricing as of Nov 12, 2026, dealcode.ai/products/platform). If an organization only requires standardized single queries against an internal database, writing a direct Python connection to the Gemini API often requires less configuration overhead. The right choice depends on whether sales and marketing teams need shared, ready-to-use assistants or dedicated developer pipelines.
Frequently Asked Questions
Which file formats work natively with file slicing in the Gemini API?
The Gemini API processes PDF files alongside native Microsoft Office and OpenDocument formats without manual file conversions. The interface also supports video and audio files using timestamp intervals. Developers supply a file URI and define the required pages, sheets, or time ranges through standard API parameters.
How long does Google retain uploaded files in the Files API?
Files uploaded to the Files API are stored on Google servers for up to 48 hours. After this period, the assigned URI expires and the content is deleted from temporary storage. For recurring tasks, applications must upload the source documents again through the API.
Can AI assistants in Google AI Mode trigger financial transactions through Google Wallet?
Google AI Mode has read-only access to saved Wallet data such as transaction overviews or loyalty programs via Personal Intelligence. The assistant cannot make payments, transfer funds, or alter account balances. Users can disconnect Wallet from search in their account settings at any point.


