File Slicing for Documents, Video, and Audio in the Gemini API
Developers can send only part of a file, such as a page range or a time interval, and are billed only for that part.
Details
- Slice by page range, worksheet, cell range, time interval, or content layer, in prompts and in function responses
- Only the selected content is processed and billed
- Word, PowerPoint, Excel, and OpenDocument files can be passed directly to the API
Best for
Working with long documents, spreadsheets, or recordings where only a section matters
Use it when
A prompt keeps paying to process a whole file when you only need a few pages, cells, or minutes
Who benefits
Developers building document and media workflows on the Gemini API
Join the newsletter to get ahead with AI.
I share strategies, new modules, free guides, and tools to get you better at using AI in your work.
Leading a team? See team programs →