AI & Compute · 3 min read

Gemini API gets file slicing: developers pay only for pages the model reads

Google's Gemini API now bills only for the file slices a model inspects. Vercel reports 14x fewer tokens on PDF skims; LiteLLM cites 67% prompt-token cuts. Live in AI Studio and Vertex AI.

By Grace Kim551 words

Key takeaways

  1. Gemini API file slicing went live Nov. 23 in Google AI Studio and Vertex AI across all Gemini 4 models.
  2. Vercel reported 14x fewer tokens skimming a PDF page for text versus rendering the whole file.
  3. LiteLLM reported slicing cut prompt tokens by 67% on a PDF and 33% on a workbook.
  4. The API now accepts Microsoft Office and OpenDocument files natively.
  5. Existing file size and page limits still apply; Google published no new pricing.
Google adds file slicing to the Gemini API so developers pay only for the pages and clips the model reads
Google adds file slicing to the Gemini API so developers pay only for the pages and clips the model reads — Boskampi / pixabay

Google has shipped server-side file slicing in the Gemini API, and developers can now be billed for a single page, cell range or media clip instead of an entire uploaded file. Google DeepMind product manager Rohan Doshi and principal engineer Ben Caine announced the change on Monday, Nov. 23.

The controls are live today in Google AI Studio and Vertex AI across all Gemini 4 models. Existing file size and page limits still apply. The same update adds native upload support for Microsoft Office and OpenDocument files, formats developers previously had to convert themselves.

The economics are the story. Token consumption drives inference cost, and long documents inflate context windows even when a model needs one page. Slicing lets a developer target a page range, a sheet and cell range, or a start and end offset in audio and video, so the model inspects only the requested slice and billing covers only that slice.

What can developers slice?

Google specified the control surface by file type:

  • Documents and slides, including PDFs: a page range, plus a choice of low, medium or high resolution, and either extracted page text or page images.
  • Spreadsheets: a sheet index and cell range, returning data, formulas or visuals.
  • Video: start and end offsets, frame rate, and a choice of transcript, frames or audio.
  • Audio: start and end offsets.

A file uploaded once through the Files API can be reused across turns and tool calls. Agents can also specify slices inside a function response, which means a multi-step agent can pull a new page range mid-task without re-uploading anything.

How much do the token savings run?

Google published no new pricing with the update. It did cite partner measurements. Vercel reported it used 14x fewer tokens skimming a page for text than rendering an entire PDF. LiteLLM reported slicing cut prompt tokens by 67% on a PDF and 33% on a workbook.

Those figures are partner-reported, not independently verified, and they describe token reduction rather than end-to-end cost. The direction, however, is consistent: fewer tokens in context means lower per-request spend.

What is the recommended usage pattern?

Google suggests what it calls a "skim cheap, then zoom in" pattern. A developer first reads extracted text or low-resolution previews of a document, then spends high-resolution tokens only on the page that matters. The approach trades a second API call for a much smaller first one.

The reuse model reinforces this. Because one upload persists across turns and tool calls, an agent can cheaply survey a file and then request high-resolution detail on demand rather than front-loading an entire document into context.

Why does this matter for the competitive picture?

Inference cost per request has become a live differentiator among API providers, and document-heavy workloads are where token bills grow fastest. By moving slicing server-side and billing only for inspected content, Google shifts cost control from prompt engineering inside the developer's application into the API contract itself.

The absence of new pricing leaves the exact commercial terms unclear. What is confirmed is the mechanism: page-level, cell-level and segment-level billing across all Gemini 4 models, available now, with partner data showing token reductions from one-third to fourteen-fold depending on workload.

mlq.ai (Source)

Filed under

Share this article:

More from Grace Kim

Grace Kim

Show full bio

Market editor covering people, launches and day-to-day practice in Semiconductors, chip manufacturing, hardware, AI compute at Chip Dispatch.

1,261 articles

Read also

« Previous article