Computing

Google Gemini API Adds Native File Slicing and Office File Support to Cut Token Costs

Tendela Briefing ·
10 views · 0 Comments
Google Gemini API Adds Native File Slicing and Office File Support to Cut Token Costs

Image: Google · Source

Google's Gemini API now supports native file slicing controls and Microsoft Office file formats, enabling developers to target specific document sections and media clips server-side, reducing token usage during AI model processing.

Google has enhanced its Gemini API with new file slicing controls and native support for Microsoft Office and OpenDocument files, as announced on November 23, 2026. This update allows developers using the Gemini platform and Google AI Studio to upload PDFs, Office documents, spreadsheets, slides, audio, and video files directly to the API and specify precise slices for the model to analyze server-side. By narrowing the focus to targeted pages, spreadsheet cells, or media segments, users pay only for the tokens corresponding to the inspected content, significantly cutting costs for working with large files.

This native file slicing functionality enables real-world knowledge work to efficiently handle dense and multi-tabbed documents, slide decks, and lengthy recordings without the need to flatten files into plain text or process entire files upfront. Once a file is uploaded via the Files API, its URI can be referenced across multiple interaction turns or tool calls, streamlining multi-turn workflows.

Developers gain control to specify the exact file portions an AI agent inspects within function responses, facilitating optimized workflows that can first skim documents with low-cost, extracted text or low-resolution previews before zooming in with higher resolution on critical charts, layouts, or frames. This granularity is available across various content types: for documents and slides, users select page ranges, resolution levels, and content layers such as text or images; for spreadsheets, worksheet tabs, cell ranges, and content types including data and formulas; for video and audio, users choose time clips, frame rates, resolutions, and layers like transcripts or frames.

This server-side processing removes the need for client-side rendering tools like LibreOffice or ffmpeg, reducing local memory use and avoiding the overhead of maintaining per-user sandboxes for file slicing. Instead, the Gemini API's native rendering and tokenization align with the model's training, improving efficiency and simplifying client architecture.

The new file slicing supports all Gemini 4 models with existing file size and page limits remaining in effect. When no slicing options are specified, documents default to layout-preserving image pages, while spreadsheets include evaluated values, formulas, and sheet names across all tabs.

Early partners such as Gateway and SDK frameworks have validated these controls pre-launch, reporting direct reductions in prompt token expenditures within production harnesses.

Developers can access these capabilities immediately in the Gemini API via Google AI Studio, with comprehensive documentation available to guide implementation. This update marks a significant step in making AI workflows over complex, multimodal files more cost-effective and streamlined.

Introducing File Slicing Controls
Introducing File Slicing Controls · Source ↗
"Skimming a document page for text extraction used 14x fewer tokens than rendering the whole PDF - focusing on what is relevant and reducing token spend for users." Vercel
"Skimming a document page for text extraction used 14x fewer tokens than rendering the whole PDF - focusing on what is relevant and reducing token spend for users." Vercel · Source ↗
"Most LiteLLM users sending PDFs, slide decks, and spreadsheets only need a few pages or one sheet. With this feature, they can point Gemini at exactly that slice and pay only for those tokens, and it works through LiteLLM's Gemini routes with no ext
"Most LiteLLM users sending PDFs, slide decks, and spreadsheets only need a few pages or one sheet. With this feature, they can point Gemini at exactly that slice and pay only for those tokens, and it works through LiteLLM's Gemini routes with no ext · Source ↗

Sources and original reporting

Comments (0)

No comments yet. Start the discussion.

Write a comment

Comments are published after moderation. Your name and comment will be visible publicly. Account