nanobanana-skill

Generate or edit images from prompts using the Google Gemini API.

1|Updated Mar 8, 2026
One-click install
npx skills add https://github.com/tense-i/stock-market-simulator --skill nanobanana-skill-tense-i
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nanobanana-skill
Source: https://github.com/tense-i/stock-market-simulator/tree/main/skills/nanobanana-skill
Command: npx skills add https://github.com/tense-i/stock-market-simulator --skill nanobanana-skill-tense-i

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires Pillow, google-genai, python-dotenv.

What problem does it solve?

Generate or edit images using Google Gemini API via nanobanana, enabling prompt-driven image creation and editing with optional inputs and model configuration.

Core Features & Use Cases

  • Generate new images from prompts with configurable size and model.
  • Edit existing images by applying prompts to input images.
  • Save output to a user-specified filename and handle errors gracefully (e.g., missing GEMINI_API_KEY).

Quick Start

Run the nanobanana.py script with a prompt and optional --input, --size, --model, and --output options to generate or edit an image.

Frequently Asked Questions about nanobanana-skill

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate images from text prompts using the Google Gemini API?

Run the nanobanana.py script with a text prompt and optional --size, --model, and --output arguments to generate image files using the Google Gemini API.

Can I edit existing images with AI prompts using Google Gemini?

Edit existing images by passing the --input argument with your source image file alongside a text prompt to nanobanana.py, applying AI-driven image editing via the Google Gemini API.

Do I need a GEMINI_API_KEY to run Python scripts for AI image generation?

Yes, a valid GEMINI_API_KEY environment variable is required to authenticate requests. The script handles missing keys gracefully by returning an error before attempting image generation.

What Python dependencies are required for prompt-based image editing with Gemini?

Prompt-based image editing with Gemini requires Python 3 and the Pillow, google-genai, and python-dotenv libraries installed in your environment to handle image processing and API interactions.

Why does my Gemini API image generation script fail with a missing key error?

Gemini API image generation fails with a missing key error when the GEMINI_API_KEY environment variable is not set. The nanobanana.py script checks for this before processing your prompt.

What is the best way to configure model parameters for AI art generation in Python?

Configure AI art generation parameters by passing the --model and --size optional arguments to the nanobanana.py script, allowing you to select the specific Google Gemini model and output image dimensions.