The Gemini API supports PDF uploads up to 50MB per file. If your file exceeds the limit, compress it here before sending it to the API.
๐ Files never leave your deviceโก Instant processing in browser๐ธ 100% free โ no signup
๐
Drop your PDF here to fix upload errors
or click to select file โ PDF only
Target size (optional)
targeting 50 MB
โก Gemini API File Size Limits (Quick Fix)
โขGemini API and Vertex AI support PDFs up to 50MB per file for standard document understanding.
โขInline base64-encoded data sent to the Gemini API has a total request size limit of 100MB.
โขThe Gemini Files API supports uploads up to 2GB in some contexts, but document processing is optimised for smaller, denser files.
๐ Fix: Compress your file below 50 MB using the tool above.
About this tool
Inline base64-encoded requests to the Gemini API have a 100MB total request size limit. Keeping individual PDFs under 50MB ensures reliable document processing.
How to use this tool
Select or drag and drop your file into the tool above.
Adjust the settings or target size as needed for your specific requirement.
Wait a moment while your file is processed directly in your browser.
Download the final file safely to your device.
๐ก Good to know
โGemini API and Vertex AI support PDFs up to 50MB per file for standard document understanding.Google AI for Developers โ
โInline base64-encoded data sent to the Gemini API has a total request size limit of 100MB.Google AI for Developers โ
โThe Gemini Files API supports uploads up to 2GB in some contexts, but document processing is optimised for smaller, denser files.Google AI for Developers โ
โA 413 error from the Gemini API means the file is too large - compress the PDF or use the Files API for larger uploads.Google AI for Developers โ
What is the best way to upload a large PDF to the Gemini API?+
Use the Gemini Files API with Google Cloud Storage for files over 50MB. For document processing, keeping files under 50MB gives optimal performance.Source: Google AI for Developers โ
What does a 413 error mean in the Gemini API?+
It means your request exceeds the size limit. Compress the PDF to under 50MB or use the Files API for larger uploads.Source: Google AI for Developers โ
Does compressing a PDF affect what the Gemini API can read?+
No. The API reads the text layer of the PDF. Compressing image quality reduces file size without affecting the text content the API processes.Source: Google AI for Developers โ
๐ Files stay on deviceยท๐ Free foreverยท๐ต No signup required