header-langage
简体中文
繁體中文
English
Tiếng Việt
한국어
日本語
ภาษาไทย
Türkçe
Scan to Download the APP
Partnered With:

Google Equips Gemini API with 'File Scissors': PDF Input Tokens Reduced by 67% in Tests

Beating AI News Flash: Google launches native file slicing for the Gemini API. Developers can directly upload PDF, Word, PPT, Excel, audio, and video files, allowing AI to read only specified pages, spreadsheet cells, or a segment of a video, and Token fees are calculated only based on the content actually read.


For example, when analyzing a financial report hundreds of pages long, AI can first use a low-cost plain-text mode to locate the target section, then read only the high-definition images of the relevant pages to view charts and annotations. When processing Excel, it can also specify worksheets and cell ranges to separately read data, formulas, and charts.


In the past, developers could achieve similar results, but usually had to call PDF processing tools, LibreOffice, or FFmpeg themselves to split and convert files in advance. Now the Gemini API can complete these operations directly on the server side. Files only need to be uploaded once, and the Agent can repeatedly call them in subsequent tasks and decide on its own which part of the content to read next.


Testing by the AI model invocation gateway LiteLLM found that file slicing reduced input Tokens for a PDF by 67% and for an Excel workbook by 33%. Vercel said that in its tests, extracting only document page text reduced Token usage by 14 times compared with rendering the entire PDF.


This feature is now available through the API, covering the Gemini 4 series models, with the original file size and page count limits unchanged.

举报 Correction/Report
Correction/Report
Submit
Add Library
Visible to myself only
Public
Save
Choose Library
Add Library
Cancel
Finish