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.
50MB per file for standard document understanding via the Gemini API and Vertex AI.
Use the Gemini Files API with Google Cloud Storage for files over 50MB. For document processing, keeping files under 50MB gives optimal performance.
It means your request exceeds the size limit. Compress the PDF to under 50MB or use the Files API for larger uploads.
No. The API reads the text layer of the PDF. Compressing image quality reduces file size without affecting the text content the API processes.