Skip to content
nano-banana logo

Nano Banana PRO Image Generation

nano-banana

AI image generation using Nano Banana PRO (Gemini 3 Pro Image) and Nano Banana (Gemini 2.5 Flash Image). Use this skill when: (1) Generating images from text prompts, (2) Editing existing images, (3) Creating professional visual assets like infographics, logos, product shots, stickers, (4) Workin...

SKILL.md

Full skill instructions

Nano Banana PRO Image Generation

Generate professional AI images using Google's Nano Banana models via the Gemini API.

Prerequisites

  • API key must be set as GEMINI_API_KEY environment variable
  • Uses curl for all API calls (no SDK required)

Model Selection

ModelIdentifierBest For
Nano Banana PROgemini-3-pro-image-previewProfessional assets, text rendering, infographics, 4K output, complex multi-turn editing
Nano Bananagemini-2.5-flash-imageFast generation, simple edits, lower cost

Default to PRO for quality work. Use Flash for rapid iterations or simple tasks.

CRITICAL: Prompt Engineering First

BEFORE calling the API, always craft an effective prompt. Read references/​prompting-guide.md for comprehensive prompting strategies. Key principles:

The Golden Rules

  1. Describe scenes, don't list keywords - Write narrative descriptions, not tag soup
  2. Use natural language - Full sentences with proper grammar
  3. Be specific - Define subject, setting, lighting, mood, materials
  4. Provide context - The "why" helps the model make better artistic decisions
  5. Edit, don't re-roll - If 80% correct, ask for specific changes

The ICS Framework (Quick Reference)

For any image, specify:

  • Image type: What kind of visual (photo, infographic, logo, sticker, etc.)
  • Content: Specific elements, data, or information to include
  • Style: Visual style, color palette, artistic approach

API Reference

Text-to-Image Generation

curl -s -X POST \
  "https://generativelanguage.googleapis.com/​v1beta/​models/​gemini-3-pro-image-preview:generateContent" \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  -H "Content-Type: application/​json" \
  -d '{
    "contents": [{
      "parts": [{"text": "YOUR_PROMPT_HERE"}]
    }],
    "generationConfig": {
      "responseModalities": ["TEXT", "IMAGE"],
      "imageConfig": {
        "aspectRatio": "16:9",
        "imageSize": "2K"
      }
    }
  }'

Image Editing (with input image)

curl -s -X POST \
  "https://generativelanguage.googleapis.com/​v1beta/​models/​gemini-3-pro-image-preview:generateContent" \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  -H "Content-Type: application/​json" \
  -d '{
    "contents": [{
      "parts": [
        {"text": "YOUR_EDIT_INSTRUCTION"},
        {"inline_data": {"mime_type": "image/​png", "data": "BASE64_IMAGE_DATA"}}
      ]
    }],
    "generationConfig": {
      "responseModalities": ["TEXT", "IMAGE"]
    }
  }'

Configuration Options

ParameterValuesNotes
aspectRatio1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9Match use case
imageSize1K, 2K, 4KUse uppercase K; PRO model only for 4K

Google Search Grounding (Real-time Data)

Add "tools": [{"google_search": {}}] to generate images based on current information:

curl -s -X POST \
  "https://generativelanguage.googleapis.com/​v1beta/​models/​gemini-3-pro-image-preview:generateContent" \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  -H "Content-Type: application/​json" \
  -d '{
    "contents": [{"parts": [{"text": "Create an infographic of current tech stock prices"}]}],
    "tools": [{"google_search": {}}],
    "generationConfig": {
      "responseModalities": ["TEXT", "IMAGE"],
      "imageConfig": {"aspectRatio": "16:9"}
    }
  }'

Workflow

Step 1: Craft the Prompt

Use the ICS framework and prompting guide. Examples:

Photorealistic:

A photorealistic close-up portrait of an elderly Japanese ceramicist with deep wrinkles and a warm smile, inspecting a tea bowl. Soft golden hour light from a window. 85mm lens, shallow depth of field. Serene mood.

Infographic:

Create a clean, modern infographic explaining photosynthesis as a recipe. Show "ingredients" (sunlight, water, CO2) and "finished dish" (energy). Style like a colorful kids' cookbook page.

Product Shot:

High-resolution studio photograph of a matte black ceramic coffee mug on polished concrete. Three-point softbox lighting, 45-degree angle, sharp focus on rising steam. Square format.

Step 2: Generate Image

Use scripts/​generate-image.sh or call API directly:

./​scripts/​generate-image.sh "Your prompt here" output.png --ratio 16:9 --size 2K

Step 3: Process Response

The API returns base64-encoded image data. Extract and decode:

# Response contains: {"candidates":[{"content":{"parts":[{"inlineData":{"mimeType":"image/​png","data":"BASE64..."}}]}}]}
# Extract with jq and decode:
cat response.json | jq -r '.candidates[0].content.parts[] | select(.inlineData) | .inlineData.data' | base64 -d > image.png

Common Use Cases

Landing Pages & Ads

  • Use 16:9 or 21:9 for hero images
  • Specify brand colors, modern/​minimal style
  • Include text requirements in prompt

Logos & Icons

  • Use 1:1 aspect ratio
  • Request "minimalist", "clean lines", "vector-style"
  • Specify color scheme explicitly

Product Photography

  • Describe lighting setup (softbox, natural, studio)
  • Mention surface/​background materials
  • Include camera angle and lens type

Infographics

  • Define data to visualize
  • Specify style (corporate, playful, technical)
  • Request clear text and labeled sections

Stickers & Illustrations

  • Request "bold outlines", "kawaii", "cel-shading"
  • Specify "white background" or "transparent background"
  • Define color palette

Character Consistency (Multiple Images)

  • PRO supports up to 14 reference images
  • Explicitly state: "Keep facial features exactly the same as Image 1"
  • Describe expression/​pose changes while maintaining identity

Scripts

See scripts/​generate-image.sh for a ready-to-use generation script.

Detailed Prompting Guide

For advanced techniques including:

  • Photorealistic scene templates
  • Text rendering best practices
  • Sequential art and storyboarding
  • Dimensional translation (2D↔3D)
  • Search grounding for real-time data

Read references/​prompting-guide.md.

More skills from diegosouzapw

accessibility logo
diegosouzapw/awesome-omni-skill

accessibility

Accessibility guidelines for VS Code features — covers accessibility help dialogs, accessible views, verbosity settings, accessibility signals, ARIA alerts/status announcements, keyboard navigation, and ARIA labels/roles. Applies to both new interactive UI surfaces and updates to existing feature...

62 1
View
mermaid-diagrams logo
diegosouzapw/awesome-omni-skill

mermaid-diagrams

Mermaid diagram creation for flowcharts, sequences, ERDs, and more. Generate diagrams from text in markdown files. Use for documentation, architecture diagrams, and visual representations. Triggers on mermaid, flowchart, sequence diagram, ERD, entity relationship, gantt chart, pie chart, class di...

62 1
View
tauri2-react-rust logo
diegosouzapw/awesome-omni-skill

tauri2-react-rust

Guides development of cross-platform desktop apps with Tauri 2, TypeScript, React, and Rust. Use when building Tauri apps, implementing IPC, designing Rust backend or TypeScript/React frontend, when researching or cloning a website (open site, snapshot elements), when verifying local dev or built...

62 1
View
fp-ts-errors logo
diegosouzapw/awesome-omni-skill

fp-ts-errors

Handle errors as values using fp-ts Either and TaskEither for cleaner, more predictable TypeScript code. Use when implementing error handling patterns with fp-ts.

62 0
View
ring:pre-dev-research logo
diegosouzapw/awesome-omni-skill

ring:pre-dev-research

Gate 0 research phase for pre-dev workflow. Dispatches 3 parallel research agents to gather codebase patterns, external best practices, and framework documentation BEFORE creating PRD/TRD. Outputs research.md with file:line references.

62 0
View
create-assistant logo
diegosouzapw/awesome-omni-skill

create-assistant

Create and configure Vapi voice AI assistants with models, voices, transcribers, tools, hooks, and advanced settings. Use when building voice agents, phone bots, customer support assistants, or any conversational AI that handles phone or web calls.

62 0
View
codex-headless logo
diegosouzapw/awesome-omni-skill

codex-headless

Delegiere Aufgaben an OpenAI Codex CLI im Headless-Mode. Nutzt ChatGPT Subscription (KEIN API Key). Nur Workspace-Zugriff, KEIN System-Zugriff. Auto-Accept mit --full-auto. Web-Recherche mit --search.

62 0
View
social-media-scheduler logo
diegosouzapw/awesome-omni-skill

social-media-scheduler

Generate a full week of social media content for any topic. Outputs platform-optimized posts for Twitter/X, LinkedIn, and Instagram with hashtags and posting times.

62 0
View
Data Privacy Compliance logo
diegosouzapw/awesome-omni-skill

Data Privacy Compliance

Data privacy and regulatory compliance specialist for GDPR, CCPA, HIPAA, and international data protection laws. Use when implementing privacy controls, conducting data protection impact assessments, ensuring regulatory compliance, or managing data subject rights. Expert in consent management, da...

62 0
View
triple-review logo
diegosouzapw/awesome-omni-skill

triple-review

Reviews a task using the TRIPLE protocol, as the review agent.

62 0
View
Tech Stack & Architecture Decision logo
diegosouzapw/awesome-omni-skill

Tech Stack & Architecture Decision

Define and document the technology stack and architecture decisions for a project. Use when the user needs to choose a tech stack, make architecture decisions, define infrastructure choices, or document technology selections. Triggers on requests like "define the tech stack", "choose technologies...

62 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View