Documented vs. Actual File Size Limit for Large Files (PDFs) in Gemini Flash 2.0 #353
Labels
priority: p3
Desirable enhancement or fix. May not be included in next release.
type: question
Request for information or clarification. Not an issue.
I have several hundred large PDFs, each several hundred pages long, with file sizes ranging from ~100MB to 300MB. I want to OCR them using Gemini Flash 2.0.
To test the prompting, I used smaller samples by trimming the PDFs down to around 10 pages. Processing these smaller files works very well.
However, when attempting to process the full-sized PDFs, I ran into issues.
According to the Gemini documentation, files larger than 20MB should be uploaded using the File API (which I can successfully do). The documentation also states that the maximum file size per file is 2GB:
Despite this, when I attempted to process my full-sized PDFs, I encountered file size limit errors. I opened an issue here, and through testing, we found that only PDFs up to 52,428,800 bytes (~52MB) seem to work.
This contradicts the documented 2GB limit and appears to be an arbitrary and very low restriction, especially given Gemini's extreme long-context capabilities. Unfortunately, a 52MB file size limit is not viable for my use case.
Before I abandon using Gemini for this, can you confirm: Is ~52MB really the maximum file size that can be processed?
Thanks in advance for any clarification on this matter.
The text was updated successfully, but these errors were encountered: