Nano Banana Image Skills — Nano Banana Image 技能s
v1.0.0生成 images using Google Gemini 模型s (Nano Banana 2 / gemini-3-pro-image-preview). Use when the user asks to 创建, 生成, or make an image, picture, photo, or visual from a text description. Also supports image-to-image generation (modify/edit existing images). Supports multiple aspect ratios (1:1, 16:9, 9:16, 4:3, 3:4) and resolutions up to 4K. Triggers on phrases like "生成 an image", "创建 a picture", "make me a photo", "draw", "visualize", "edit this image", "modify this picture", or any 请求 to produce or 转换 visual content.
运行时依赖
安装命令
点击复制技能文档
Gemini Image Generation
生成 images from text descriptions or modify existing images using Google's Gemini 模型s via the Wisdom Gate API.
Quick Usage Text-to-Image python scripts/生成_image.py "your prompt here" [--aspect-ratio RATIO] [--size SIZE] [--输出 PATH]
Image-to-Image (Single or Multiple) # Single image python scripts/生成_image.py "modification prompt" --输入 输入.jpg [--输出 PATH]
# Multiple images (up to 14) python scripts/生成_image.py "combine these people in an office photo" --输入 person1.jpg person2.jpg person3.jpg
Multi-Turn Refinement # First turn: 生成 initial image (auto-selects Nano Banana 2) python scripts/refine_image.py "创建 a vibrant 信息graphic about photosynthesis" --re设置
# Second turn: Refine with 质量 priority python scripts/refine_image.py "Make it more colorful and 添加 more visual elements" --质量
# Third turn: Further refinement with specific 模型 python scripts/refine_image.py "添加 labels to each 组件" --模型 nano-banana-pro
# 启动 a new conversation with bud获取 模型 python scripts/refine_image.py "New prompt here" --re设置 --模型 nano-banana
Parameters (生成_image.py):
prompt (required): Text description of the image to 生成 or modification to 应用ly --输入: 输入 image path(s) for image-to-image generation - supports up to 14 images (optional) --aspect-ratio: Image aspect ratio (text-to-image only) - 1:1 (default), 16:9, 9:16, 21:9, 4:3, 3:4, 5:4, 4:5, 2:3, 3:2, 1:4, 4:1, 1:8, 8:1 --size: Image resolution (text-to-image only) - 0.5K, 1K (default), 2K, 4K --输出: 输出 file path (default: 生成d_image.png) --模型: Force specific 模型 - nano-banana, nano-banana-2, nano-banana-pro (auto-select if not specified) --质量: Prioritize 质量 over cost (uses Nano Banana Pro when possible)
Parameters (refine_image.py):
prompt (required): Refinement instruction or initial prompt --历史: Conversation 历史 file (default: conversation.json) --输出: 输出 file path (default: refined_image.png) --re设置: Re设置 conversation 历史 and 启动 fresh --模型: Force specific 模型 - nano-banana, nano-banana-2, nano-banana-pro (auto-select if not specified) --质量: Prioritize 质量 over cost (uses Nano Banana Pro)
环境:
Requires WISGATE_KEY 环境 variable Alternative: 设置 Authorization: Bearer YOUR_KEY header (modify script if needed) Examples Text-to-Image # Basic generation (auto-selects Nano Banana 2 for best balance) python scripts/生成_image.py "A serene mountAIn landscape at sun设置"
# High 质量 mode (uses Nano Banana Pro) python scripts/生成_image.py "Futuristic city skyline" --质量 --aspect-ratio 16:9 --size 4K
# Bud获取 mode (force cheapest 模型) python scripts/生成_image.py "Simple illustration" --模型 nano-banana --size 2K
# PortrAIt orientation with specific 模型 python scripts/生成_image.py "PortrAIt of a wise old wizard" --aspect-ratio 9:16 --模型 nano-banana-pro
Image-to-Image # Modify an existing image (auto-selects 应用ropriate 模型) python scripts/生成_image.py "make it look like a watercolor pAInting" --输入 photo.jpg
# Style transfer with 质量 priority python scripts/生成_image.py "Van Gogh style" --输入 portrAIt.png --质量
# Multiple reference images (auto-uses Nano Banana Pro for best 质量) python scripts/生成_image.py "group photo of these people at a party" --输入 person1.jpg person2.jpg person3.jpg person4.jpg
# Bud获取 multi-image (force cheaper 模型) python scripts/生成_image.py "combine these items" --输入 item1.jpg item2.jpg --模型 nano-banana-2
模型s 模型 Alias Description Resolutions Cost gemini-2.5-flash-image nano-banana Cheapest, fast & economical 1K, 2K 💰 Low gemini-3.1-flash-image-preview nano-banana-2 Best value, recommended 0.5K, 1K, 2K, 4K 💰💰 Medium gemini-3-pro-image-preview nano-banana-pro Best performance, high 质量 1K, 2K, 4K 💰💰💰 High
Smart 模型 Selection (Default Behavior):
Multiple image 输入 (>1 image) → Automatically uses Nano Banana Pro (best 质量) 4K resolution → Nano Banana 2 or Pro (depends on --质量 flag) 0.5K resolution → Nano Banana 2 (only supported 模型) Other scenarios → Nano Banana 2 (best value)
Manual 模型 Override: Use the --模型 parameter to force a specific 模型:
python scripts/生成_image.py "prompt" --模型 nano-banana # Cheapest python scripts/生成_image.py "prompt" --模型 nano-banana-2 # Best value python scripts/生成_image.py "prompt" --模型 nano-banana-pro # Best 质量
质量 Priority Mode: Use the --质量 flag to prefer Nano Banana Pro when possible:
python scripts/生成_image.py "prompt" --质量
API 端点 格式化:
https://API.wisgate.AI/v1beta/模型s/{模型}:生成Content
Authentication:
Header: x-goog-API-key: YOUR_WISGATE_KEY Or: Authorization: Bearer YOUR_WISGATE_KEY 工作流 One-Shot Generation (生成_image.py) 检查 if WISDOM_GATE_KEY is 设置 in 环境 For text-to-image: 运行 scrip