Hot AI News

Gemini API now bills only the pages and frames it reads

Google's new file slicing controls let developers pick pages, cells and clips server-side, and Office files can now be uploaded directly. Partners cite token cuts of 33% to 14x.

Gemini API now bills only the pages and frames it reads
Image: Google

Google has added native file slicing controls to the Gemini API, letting developers choose which pages, spreadsheet cells or media segments the model loads, according to the official announcement. Tokens are billed only for the parts Gemini actually inspects.

Pages, sheets and clips chosen on the server

The feature is available today through the API in Google AI Studio and Gemini for business, and Google says it works across all Gemini 4 models. It arrives together with direct upload of Microsoft Office and OpenDocument files, so documents, slides and spreadsheets no longer need to be converted first. Existing file size and page limits still apply, and the post lists no new quotas.

LiteLLM's quote on token cuts of 67% for a PDF and 33% for a workbook with file slicing
Image: Google

Controls differ by file type:

  • Documents and slides (PDF, Office, OpenDocument): a page range with start_page and end_page, a resolution of low, medium or high, and a content layer of page_text or page_image.
  • Spreadsheets (.xlsx, .xls, .ods): a worksheet via sheet_index, a cell range via visible_cells, a resolution, and layers for data, formulas and visuals.
  • Video: a time window with start_offset and end_offset, plus fps, resolution (low or high) and layers for transcript, frames or audio.
  • Audio: a time window with the same two offset fields.

If a request sets no options, documents and slides default to layout-preserving page images. Spreadsheets default to evaluated values, formulas and sheet names across all tabs.

Google's graphic introducing file slicing controls in the Gemini API
Image: Google

A file is uploaded once through the Files API and its URI can be reused across turns. The URI can also be passed inside a function response, so an agent can decide mid-task which part of a file to open next. Google’s own example uploads a Word report, asks which page holds a revenue chart using only extracted text, then reopens that single page as a high-resolution image with the same URI.

Advertisements

What the early partner numbers say

Google cites two gateway and SDK partners that tested the controls before launch. Vercel reports that Skimming a document page for text extraction used 14x fewer tokens than rendering the whole PDF. LiteLLM says most of its users sending PDFs, slide decks and spreadsheets need only a few pages or one sheet, and reports that slicing cut prompt tokens by 67% for a PDF and 33% for a workbook in its testing.

Gemini API now bills only the pages and frames it reads
Image: Google

These are partner claims shown as quote images on Google’s page. They come from single workloads, and the post does not describe the files, page counts or settings behind them, so they are not a benchmark.

Why the savings depend on the model you pair it with

The post gives no price for the slicing feature itself, which suggests the saving comes purely from sending fewer tokens at the model’s normal rates. That makes the model’s own price the multiplier. According to our roundup of this week’s models, Gemini 4 Neon, released on Nov 18, is priced at $3 per million input tokens and $15 per million output tokens, with a 1M-token context window. Those figures come from Google as reported there, and the file slicing post does not repeat them.

At $3 per million input tokens, a page-image dump of a long PDF adds up quickly across repeated agent turns, because every turn that re-sends the same file pays again. Skimming with page_text first, then opening one page at high resolution, is the pattern Google’s own sample uses to avoid that. The 1M window also means a whole large file can often fit, so the practical gain here is cost and focus rather than making the file fit at all.

The other saving is on the developer’s side of the wire. Google argues that when an API accepts only whole files, agent builders end up running LibreOffice, PDF renderers and ffmpeg locally, which bloats memory and forces enterprise platforms to maintain per-user sandboxes. Moving rendering and slicing server-side removes that tooling, though it also ties the workflow more closely to Google’s own rendering. Teams that already pay for local conversion infrastructure are the ones with something concrete to compare.

Google does not say how the slicing affects accuracy, for example whether a text-only skim misses details in charts or scanned pages. Its sample guards against that by moving to a high-resolution image for the key page. The post also offers no price table, no latency figures and no list of supported regions or plans beyond the two platforms named. Developers can find the options in Google’s document processing docs, linked from the announcement. Teams that route traffic through gateways such as LiteLLM or Vercel’s SDK will see the effect first, since both are named as early adopters.

Sign Up for the Daily AI Pulse

One email a day. All the stories that matter.

Alex CarterAI News & Big Tech Correspondent

Alex Carter writes for Aiholics, keeping readers updated on the fast-paced world of AI and Big Tech.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may also like