Skip to main content
Google has shut down gemini-2.0-flash-exp. Replace it with gemini-3.5-flash before running. See Gemini 2.0 Flash model status.
image_input.py

Run the Example

1

Set up your virtual environment

2

Install dependencies

3

Export your Google API key

4

Update the Gemini model

Replace gemini-2.0-flash-exp with gemini-3.5-flash in the saved file.
5

Run the example

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