Google GenAI SDK Source Code (Nano Banana)
Use web_fetch to retrieve raw code for deep inspection of image generation parameters.
Base URL: https://raw.githubusercontent.com/googleapis/python-genai/main/google/genai/
Key Modules
Models (Generation)
- File:
models.py - URL:
https://raw.githubusercontent.com/googleapis/python-genai/main/google/genai/models.py - Purpose:
generate_images(helper) andgenerate_content(core logic).
Types (Configuration)
- File:
types.py - URL:
https://raw.githubusercontent.com/googleapis/python-genai/main/google/genai/types.py - Purpose: Definitions for
ImageConfig,GenerateImagesConfig,PersonGeneration,SafetyFilterLevel.
Client
- File:
client.py - URL:
https://raw.githubusercontent.com/googleapis/python-genai/main/google/genai/client.py