TUESDAY, NOVEMBER 24, 2026 Tech news, minus the noise.
N News Cast
LATEST
Home  /  Dev
Dev

The Gemini API Can Now Read Just One Page of Your PDF, and Your Token Bill Should Notice

The Gemini API added server-side file slicing on November 24, so developers can ask the model to read only specific PDF pages, spreadsheet cells, video segments, or audio clips, and pay tokens only for the parts it inspects.

The Gemini API Can Now Read Just One Page of Your PDF, and Your Token Bill Should Notice
Source: Martin Vorel (CC BY-SA 4.0)

The Gemini API added server-side file slicing on November 24, and it solves a problem every developer who builds with AI has felt. You have a 500-page PDF and one question about page 42. Until now, you either sent the whole file and paid for all of it, or you built your own extraction pipeline to cut it up first. Now the API does the cutting for you.

File slicing lets developers pass parameters that tell the model to read only specific PDF pages, spreadsheet cells, video segments, or audio clips. You pay tokens only for the parts the model actually inspects. It is a small feature with a large effect on the economics of document-heavy agents.

How file slicing works in practice

The idea is straightforward. When you send a file to the Gemini API, you can now specify slices: pages 40 to 45 of a PDF, a range of cells in a spreadsheet, a time segment of a video, or a clip of an audio file. The model sees only those slices, and your token count reflects only what was read.

This matters most for agents that work with large documents. A contract review agent that needs one clause, a research agent that needs one table from a 200-page report, or a support agent that needs one section of a manual can now ask for exactly that. The rest of the file never enters the context window, which saves money and, just as importantly, reduces the noise the model has to sort through.

It also changes how you design prompts. Instead of writing careful instructions to ignore most of a document, you simply do not send most of it. The instruction becomes the slice, which is harder to get wrong than a paragraph of guidance.

It pairs with Tool Retrieval, and the pattern is the point

File slicing arrived one day after Google previewed Tool Retrieval in the Gemini API, which loads tool schemas only when an agent needs them. The two features share a philosophy: send less, pay less, and keep the context window for the work that matters.

That philosophy is becoming the theme of the Gemini API this month. Both features are aimed at the same audience: developers building agents that juggle large files and many tools, where context is the most expensive resource. Google is betting that the developers who care about token bills are the ones who will build the most durable products, and it is giving them the controls to keep those bills down.

For comparison, the GitHub CLI 2.105 release made a similar efficiency move for developers, letting you wait for pull request events instead of polling in a loop. The industry is full of small features like these right now, and they add up: less wasted work, fewer tokens burned, fewer requests sent.

What to watch before you rebuild around it

File slicing is new, and new API features have rough edges. Check SDK support for your language before you plan a migration, and test the exact slice formats the API accepts. Video and audio slicing have different constraints than PDF pages, and the pricing details matter: the savings are real only if the slicing itself does not add overhead that eats them.

Also think about when not to slice. If your agent genuinely needs the whole document, slicing adds complexity for no benefit. If your question depends on context spread across many pages, a narrow slice can make the model confidently wrong instead of usefully right. The feature is a scalpel, not a default.

The open-source agent frameworks that shipped this month will probably absorb file slicing quickly, since they all face the same context problem. When they do, it will become invisible infrastructure: your framework slices, the API bills less, and nobody thinks about it again. That is the best outcome for a feature like this. It disappears into the stack, and your token bill gets quietly smaller.

AS
News Cast Editorial Team

We cover AI, gadgets, startups and security — original reporting and explainers, written by humans, for humans. Got a tip? Reach us via the contact page.