Skip to main content
NanoBananaTools enables an Agent to generate images using Google’s Gemini 2.5 Flash Image model (Nano Banana).

Prerequisites

You need to install the google-genai and Pillow libraries.
Set the GOOGLE_API_KEY environment variable. You can obtain an API key from Google AI Studio.

Example

The following agent will use Nano Banana to generate an image based on a text prompt.
nano_banana_tools.py

Toolkit Params

Toolkit Functions

Developer Resources