Gemini API Adds File Slicing Controls for Documents and Media (2026)

A long document and a filmstrip being cropped into a few glowing selected pages and a short media segment.

Written by

in

,

Takeaway: On November 23, 2026, Google DeepMind launched native file slicing controls in the Gemini API, in Google AI Studio and on the Gemini platform, along with native file upload support for Microsoft Office and OpenDocument formats. You can upload PDFs, Office files, audio, and video once, then ask the API to inspect only the pages, spreadsheet cells, media segments, and content layers you need. Official docs say Gemini counts and bills tokens only for the sliced output sent to the model.

The details below come from that official announcement and the Gemini API documentation for document understanding, video understanding, audio, and the Files API. The launch post says native file slicing works across all Gemini 4 models, and that existing file size and page limits still apply to the uploaded file. The developer docs also document the same processing options for Gemini 3 and Gemini 4+ models. This article does not invent a complete model list or a full price sheet beyond the published per-page token estimates.

Upload once, inspect only what you need

Google’s post frames the feature as a way to keep context on the relevant part of a file without flattening documents locally or sending an entire deck, workbook, or recording on every turn. You can upload a file with the Files API and reuse its URI across turns and tool calls. The API also lets an agent specify which parts to inspect inside a function response, which official docs write as function_result.result. A recommended pattern is to skim first with extracted text, low-resolution previews, or transcripts, then spend higher-resolution tokens only on the charts, dense layouts, or frames that matter.

When you omit processing options, official document docs give these Gemini 4+ defaults: documents and presentations are ingested as page or slide images at medium resolution (about 560 tokens per page); .xlsx and .xls workbooks include evaluated values, formulas, and sheet names across all tabs. The launch post similarly says that omitted options default to layout-preserving page images for documents and slides, and that spreadsheets include evaluated values, formulas, and sheet names across all tabs.

Documents, slides, and spreadsheets

For PDFs and for Word, PowerPoint, and OpenDocument files, you pass processing with {"type": "static", ...} on a document block and set processing.page_options:

  • start_page and end_page are 1-indexed and inclusive. If only an end page is set, the start defaults to 1. If only a start page is set, the end defaults to the last page. Values past the page count yield an empty slice for a too-large start, or clamp a too-large end. Values of 0 or below return 400 INVALID_ARGUMENT.
  • content_layers can be page_image (rendered page images), page_text (extracted text), or both. When processing is set, the default is ["page_image"].
  • resolution is set on the outer document block as low, medium, or high. The default is medium. Official docs estimate about 280 tokens per page at low, 560 at medium, and 1,120 at high for Gemini 3 and Gemini 4 models.

For spreadsheets (.xlsx, .xls, and .ods), official docs use processing.spreadsheet_options:

  • sheet_index is the 1-indexed worksheet in tab order. Omit it to ingest all sheets, up to 50,000 cells per sheet. Out-of-range indexes return 400 INVALID_ARGUMENT.
  • visible_cells is a standard A1 cell or range, such as A1:G40, and crops all selected layers to that region.
  • content_layers can include data (evaluated values), formulas, and visual (a rendered sheet snapshot for charts and layout). The documented default is ["data", "formulas"].

The launch post’s worked example uploads a Word file once, skims every page as extracted text with gemini-4-hydrogen to find the right section, then reuses the same URI to inspect a single page at high resolution with gemini-4-neon. Official docs give the same skim-then-zoom advice for large Office documents and presentations. Supported Office and OpenDocument MIME types are listed in the document-understanding guide, including .docx, .doc, .dotx, .odt, .pptx, .ppt, .odp, .xlsx, .xls, and .ods.

Video and audio clips

For video, official docs let you clip an interval, set a custom frame rate, and choose content layers in "static" mode. Gemini bills tokens only for the clipped interval and the selected layers. start_offset and end_offset are second strings that end in s, such as 1200s or 10.5s. An end past the video length clamps to the end; a start past the video length returns 400 INVALID_ARGUMENT. Custom fps must be in (0, 24].

By default, static video processing includes sampled frames and audio (content_layers: ["frames", "audio"]). You can pass any combination of frames (billed by resolution and fps), audio (billed at standard audio token rates), and transcript (timestamped text, billed as text tokens). Official docs recommend requesting a transcript first on long videos, then inspecting the relevant clip with frames. The launch post lists video resolution as low or high.

Audio blocks support the same style of interval clip. start_offset defaults to 0s; end_offset defaults to the end of the file and clamps if it exceeds the duration. The end must be greater than the start. Official audio docs say Gemini bills tokens only for the clipped duration.

Limits, storage, and cost

Document-processing docs say the following limits apply to the full uploaded file even when you slice it, and that they cover both inline data and Files API uploads: up to 50 MB per file, 1,000 pages per PDF, or 2,000 pages or slides per Office or OpenDocument file, and up to 50,000 cells per spreadsheet sheet. The Files API guide separately states that uploaded files are stored for 48 hours, that a project can store up to 20 GB of files with a 2 GB per-file maximum, and that the Files API itself is available at no cost in regions where the Gemini API is available. For video, the video guide still tells you to use the Files API when the total request size is larger than 20 MB, the duration is significant, or you plan to reuse the file.

Token billing for sliced documents is described in the docs: when processing options are set, Gemini counts and bills only the selected pages, sheets, and content layers sent to the model. The model also receives total page counts and worksheet names automatically so it can request follow-up ranges across turns. Page-image token estimates for Gemini 3 and Gemini 4 are the 280 / 560 / 1,120 figures above; Gemini 2.5 is documented as a flat 258 tokens per page. This article does not convert those estimates into dollar prices.

File slicing is an API efficiency control, not a change to the underlying Gemini 4 models themselves. For recent model context, see our earlier notes on Gemini 4 Hydrogen and Tool Retrieval in the Gemini API.

Frequently asked questions

When did Google add file slicing to the Gemini API?

The official Google DeepMind blog post is dated November 23, 2026. The controls are available in the API in Google AI Studio and on the Gemini platform.

Which models support native file slicing?

The launch post says native file slicing works across all Gemini 4 models. The developer docs also document the processing options for Gemini 3 and Gemini 4+ models in user input and inside function results.

Do I still pay to process the whole file if I slice it?

Official docs say that when you set processing options, Gemini counts and bills only the selected pages, sheets, media interval, and content layers sent to the model. Size and page limits still apply to the whole uploaded file.

Can I upload Word and Excel files directly?

Yes. The November 23 announcement added native upload support for Microsoft Office and OpenDocument formats. The document guide lists MIME types for Word, PowerPoint, Excel, and the corresponding OpenDocument files, passed as document blocks like PDFs.

What are the document size and page limits?

Official document-processing docs cap a file at 50 MB, a PDF at 1,000 pages, and an Office or OpenDocument file at 2,000 pages or slides, even when slicing. Spreadsheets are capped at 50,000 cells per sheet.

How long do uploaded files stay available?

The Files API guide says uploaded files are stored for 48 hours and can also be deleted manually. The Files API is documented as available at no cost in regions where the Gemini API is available.

Can an agent choose the slice on a later turn?

Yes. The launch post says the API lets an agent specify which parts of a file to inspect inside a function response. Docs place those options on function_result.result as well as on user input.

What resolution should I use?

For documents and slides, official docs default to medium (about 560 tokens per page) and suggest scanning with page_text first, then requesting page_image at high resolution only for pages with charts or dense layouts. High is about 1,120 tokens per page; low is about 280. The launch post lists video resolution as low or high.

Comments

Leave a Reply