>
Generate images using Google's Nano Banana (Gemini) image generation API by crafting optimized prompts and running the bundled generation script.
The user needs:
google-genai Python package (pip install google-genai)GEMINI_API_KEY environment variable set (get one at https://aistudio.google.com/apikey)If either is missing, tell the user what to install/configure before proceeding.
Ask targeted questions to fill gaps in the user's description. Focus on the most important missing dimensions first — don't ask everything at once. Ask 2-3 questions max per round.
| Dimension | What to ask |
|---|---|
| Subject | Who or what is the main focus? |
| Setting | Where does this take place? |
| Mood | What feeling should it evoke? |
| Style | Photorealistic, watercolor, cinematic, editorial, anime? |
| Composition | Close-up, wide shot, bird's eye? |
| Lighting | Golden hour, dramatic side-light, soft diffused, neon? |
| Purpose | Social media, website hero, print, presentation? |
| Text | Any text to render in the image? |
If the user gives a clear, detailed description, skip the questions and go straight to prompt building.
Write a natural-language prompt as if briefing a human artist. Key principles: