Skip to main content
For gemini-3.5-flash on Vertex AI, current limits are 50 MB for PDF input through the API or Cloud Storage, 7 MB for text/plain, and 30 MB for Cloud Storage image input. See Gemini 3.5 Flash model limits. This example’s blanket 2 GB limit and additional MIME-type claims are stale.
gcs_file_input.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export environment variables

4

Authenticate with Google Cloud

Sign in with Application Default Credentials:
5

Run the example

Save the code above as gcs_file_input.py, then run:
Full source: cookbook/90_models/google/gemini/gcs_file_input.py