nano-banana-build
Original:🇺🇸 English
Translated
Generate and edit high-quality images using Gemini 2.5 Flash Image and Gemini 3 Pro Image (Nano Banana). Supports Text-to-Image, Style Transfer, Virtual Try-On, and Character Consistency.
6installs
Added on
NPX Install
npx skill4agent add cnemri/google-genai-skills nano-banana-buildTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Nano Banana Image Generation Skill
Use this skill to generate and edit images using the Python SDK with Gemini's specialized image models (Nano Banana).
google-genaiQuick Start Setup
python
from google import genai
from google.genai import types
from PIL import Image
import io
client = genai.Client()Reference Materials
- Model Capabilities: Comparison of Gemini 2.5 vs 3 Pro, resolutions, and token costs.
- Image Generation: Text-to-Image, Interleaved Text/Image.
- Image Editing: Subject Customization, Style Transfer, Multi-turn Editing.
- Thinking Process: Understanding thoughts and signatures (Gemini 3 Pro).
- Recipes: Extensive collection of examples (Logos, Stickers, Mockups, Comics, etc.).
- Source Code: Deep inspection of SDK internals.
Available Models
- (Nano Banana): Fast, high-quality generation and editing. Best for most use cases.
gemini-2.5-flash-image - (Nano Banana Pro): Highest fidelity, supports
gemini-3-pro-image-previewand2Kresolution, complex prompt adherence, and grounding.4K
Common Workflows
1. Fast Generation
python
response = client.models.generate_content(
model='gemini-2.5-flash-image',
contents='A cute robot eating a banana',
config=types.GenerateContentConfig(
response_modalities=['IMAGE']
)
)2. High-Quality Editing
python
response = client.models.generate_content(
model='gemini-3-pro-image-preview',
contents=[
types.Part.from_uri(file_uri='gs://.../shoe.jpg', mime_type='image/jpeg'),
"Change the color of the shoe to neon green."
],
config=types.GenerateContentConfig(response_modalities=['IMAGE'])
)