cd /news/artificial-intelligence/introducing-file-slicing-controls-in… · home › topics › artificial-intelligence › article
[ARTICLE · art-174926] src=blog.google ↗ pub= topic=artificial-intelligence verified=true sentiment=↑ positive

Introducing file slicing controls in the Gemini API

Google launched file slicing controls in the Gemini API across Google AI Studio and the Gemini platform, letting developers pass PDFs, Office and OpenDocument files, audio, and video directly and request only the pages, spreadsheet cells, media segments, and layers they need, with tokens billed only for the parts Gemini inspects. The controls work across all Gemini 4 models and include page ranges and resolution for documents, sheet_index and visible_cells for spreadsheets, start_offset/end_offset clipping plus fps for video, and time-interval clipping for audio, alongside native upload support for Microsoft Office and OpenDocument formats. Google said the server-side slicing removes the need for agents to run LibreOffice, PDF renderers, and ffmpeg in the client harness, and that files uploaded once via the Files API can be reused by URI across turns and tool calls.

key takeaway

Upload a file once via the Files API and reuse its URI across turns, slicing by start_page/end_page, sheet_index/visible_cells, or start_offset/end_offset so tokens are billed only for the parts Gemini inspects.

by read3 min views2 publishedNov 23, 2026
Introducing file slicing controls in the Gemini API
Image: Google AI Blog

Today, we're launching new file slicing controls in the API across Google AI Studio and Gemini platform, alongside native file upload support for Microsoft Office and OpenDocument formats. You can now pass PDFs, Office files (docs, slides, spreadsheets), audio, and video directly to the Gemini API and request only the pages, spreadsheet cells, media segments, and layers you need. This keeps context focused on the relevant parts of a file while billing tokens only for the parts Gemini inspects.

Inspect only what you need #

Real-world knowledge work lives in dense PDFs, slide decks, multi-tab workbooks, and long recordings. With server-side slicing, you do not have to flatten files to plain text or ingest entire files up front.

  • Upload once, slice across turns: Upload a file once with the Files API and reuse its URI across turns and tool calls.
  • Give your agent control: The API lets the agent specify what parts of a file to inspect directly inside afunction response for faster and more efficient multi-turn workflows
  • Skim cheap, then zoom in: Skim first with extracted text, low-res previews, or transcripts, then spend high-resolution tokens only on the charts, dense layouts, and frames that matter.

Slice documents, spreadsheets, and videos and more by range, layer, resolution, and frame rate to control token usage.

Make your harness multimodal without local bloat #

When model APIs only ingest whole files, agents end up running LibreOffice, PDF renderers, and ffmpeg inside the client harness to render and slice large files. This bloats memory, clutters local disk with extracted frames, and forces enterprise platforms to maintain per-user sandboxes just to slice files. With the Gemini API, pass a Files API URI on a user turn or directly inside a function response (function_result), and the API natively slices, renders, and tokenizes each file server-side the way the model was trained to see it.

How it works #

Native file slicing works across all Gemini 4 models, and existing file size and page limits still apply to the uploaded file. You can customize processing across these media categories:

  • Documents and slides (PDF,Office and OpenDocument formats ): Select a page range (start_page, end_page), set resolution (low, medium, or high), and choose content layers (page_text or page_image).
  • Spreadsheets (.xlsx, .xls, .ods): Select a worksheet tab (sheet_index) and cell range (visible_cells), set resolution (low, medium, or high), and select content layers (data, formulas, and visuals).
  • Video : Clip time intervals (start_offset, end_offset), adjust fps and resolution (low, high), and choose content layers (transcript, frames, or audio).
  • Audio : clip time intervals (start_offset, end_offset) with ease.

When processing options are omitted from API calls, documents and slides default to layout-preserving page images, and spreadsheets include evaluated values, formulas, and sheet names across all tabs.

Example: Skim at a high level, zoom in on details

Upload a Word document once to the Files API, skim every page cheaply as extracted text to locate the right section, then reuse the same URI to inspect a single page at high resolution:

from google import genai

client = genai.Client()
doc = client.files.upload(file="quarterly_report.docx")

skim = client.interactions.create(
    model="gemini-4-hydrogen",
    input=[
        {
            "type": "document",
            "uri": doc.uri,
            "mime_type": doc.mime_type,
            "processing": {
                "type": "static",
                "page_options": {"content_layers": ["page_text"]},
            },
        },
        {
            "type": "text",
            "text": "Which page has the revenue bridge chart?",
        },
    ],
)
print(skim.output_text)

detail = client.interactions.create(
    model="gemini-4-neon",
    input=[
        {
            "type": "document",
            "uri": doc.uri,
            "mime_type": doc.mime_type,
            "resolution": "high",
            "processing": {
                "type": "static",
                "page_options": {
                    "start_page": 3,
                    "end_page": 3,
                    "content_layers": ["page_image"],
                },
            },
        },
        {
            "type": "text",
            "text": "Read the revenue bridge chart and footnotes on page 3.",
        },
    ],
)
print(detail.output_text)

Early adoption across agent frameworks #

Gateway and SDK partners validated these controls ahead of launch, cutting prompt token spend directly in production harnesses:

Get started #

Native file slicing, content-layer controls, and expanded files support are available today via the API in Google AI Studio and the Gemini platform. Check out our docs to start building.

── more in #artificial-intelligence 4 stories · sorted by recency
── more on @google 3 stories trending now
sponsored brought to you by zahid.host 4,200+ EU-deployed projects
reading about agents? ship yours in a single git push.

Run your AI side-project on zahid.host

EU-based hosting, git-push deploys, automatic HTTPS, no cold starts. Free tier with a custom domain — perfect for shipping the agent you just read about.

$git push zahid main
→ Live at https://your-agent.zahid.host ✓
Get free account → Pricing
from €0/mo · no card required
LIVE [news/introducing-file-sli…] indexed:0 read:3min 2026-11-23 · —