nano-banana-pro

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Nano Banana Pro Image Generation Skill

Nano Banana Pro 图像生成Skill

Overview

概述

This skill uses the Google Nano Banana Pro API to generate images. Use this skill when users need image generation.
本Skill使用Google Nano Banana Pro API生成图像。当用户需要生成图像时可使用本Skill。

Prerequisites

前提条件

  • Set the environment variable
    CCSKILL_NANOBANANA_DIR
    to the path of this skill's repository
    bash
    export CCSKILL_NANOBANANA_DIR="$HOME/projects/ccskill-nanobanana"
  • The environment variable
    GEMINI_API_KEY
    must be set (or specified in
    $CCSKILL_NANOBANANA_DIR/.env
    )
  • 设置环境变量
    CCSKILL_NANOBANANA_DIR
    为该Skill仓库的路径
    bash
    export CCSKILL_NANOBANANA_DIR="$HOME/projects/ccskill-nanobanana"
  • 必须设置环境变量
    GEMINI_API_KEY
    (或在
    $CCSKILL_NANOBANANA_DIR/.env
    中指定)

Usage

使用方法

Generate images with the following command:
bash
$CCSKILL_NANOBANANA_DIR/venv/bin/python $CCSKILL_NANOBANANA_DIR/generate_image.py "prompt"
通过以下命令生成图像:
bash
$CCSKILL_NANOBANANA_DIR/venv/bin/python $CCSKILL_NANOBANANA_DIR/generate_image.py "prompt"

Options

可选参数

  • --resolution
    : Resolution (1K, 2K, 4K) Default: 2K
  • --aspect
    : Aspect ratio (1:1, 16:9, 9:16, 4:3, etc.) Default: 16:9
  • --output
    : Output directory Default: ./generated_images
  • --reference
    : Reference image path (multiple allowed, up to 14)
  • --resolution
    : 分辨率(1K、2K、4K)默认值:2K
  • --aspect
    : 宽高比(1:1、16:9、9:16、4:3等)默认值:16:9
  • --output
    : 输出目录 默认值:./generated_images
  • --reference
    : 参考图像路径(最多支持14张)

Examples

示例

Basic image generation:
bash
$CCSKILL_NANOBANANA_DIR/venv/bin/python $CCSKILL_NANOBANANA_DIR/generate_image.py "a cat playing piano in watercolor style"
High-resolution wide image:
bash
$CCSKILL_NANOBANANA_DIR/venv/bin/python $CCSKILL_NANOBANANA_DIR/generate_image.py "sunset coastline" --resolution 4K --aspect 16:9
Output to specific directory:
bash
$CCSKILL_NANOBANANA_DIR/venv/bin/python $CCSKILL_NANOBANANA_DIR/generate_image.py "logo design" --output ./assets/images
基础图像生成:
bash
$CCSKILL_NANOBANANA_DIR/venv/bin/python $CCSKILL_NANOBANANA_DIR/generate_image.py "水彩风格的弹钢琴的猫"
高分辨率宽幅图像:
bash
$CCSKILL_NANOBANANA_DIR/venv/bin/python $CCSKILL_NANOBANANA_DIR/generate_image.py "日落海岸线" --resolution 4K --aspect 16:9
输出到指定目录:
bash
$CCSKILL_NANOBANANA_DIR/venv/bin/python $CCSKILL_NANOBANANA_DIR/generate_image.py "标志设计" --output ./assets/images

Reference Image Editing

参考图像编辑

Edit or modify existing images by providing reference images:
bash
undefined
通过提供参考图像来编辑或修改现有图像:
bash
undefined

Change background

更换背景

$CCSKILL_NANOBANANA_DIR/venv/bin/python $CCSKILL_NANOBANANA_DIR/generate_image.py "change background to sunset" --reference ./original.png
$CCSKILL_NANOBANANA_DIR/venv/bin/python $CCSKILL_NANOBANANA_DIR/generate_image.py "将背景更换为日落场景" --reference ./original.png

Use multiple reference images (pose, style, etc.)

使用多张参考图像(姿势、风格等)

$CCSKILL_NANOBANANA_DIR/venv/bin/python $CCSKILL_NANOBANANA_DIR/generate_image.py "draw this person in this pose" --reference ./person.png --reference ./pose.png

Reference image use cases:
- Partial image editing (background change, color adjustment, etc.)
- Style transfer (apply style from another image)
- Character consistency (same person in different scenes)
- Image compositing
$CCSKILL_NANOBANANA_DIR/venv/bin/python $CCSKILL_NANOBANANA_DIR/generate_image.py "按照这个姿势绘制人物" --reference ./person.png --reference ./pose.png

参考图像使用场景:
- 局部图像编辑(背景更换、色彩调整等)
- 风格迁移(应用另一张图像的风格)
- 角色一致性(同一人物出现在不同场景中)
- 图像合成

Prompting Guide

提示词指南

Quick Reference

快速参考

Source: 7 tips to get the most out of Nano Banana Pro - Google Official Blog
Include these elements in your prompts for better results:
  • Subject: Who/what is in the image? Be specific. (e.g., "a stoic robot barista with glowing blue eyes", "a fluffy calico cat wearing a tiny wizard hat")
  • Composition: How is the shot framed? (e.g., extreme close-up, wide shot, low-angle shot, portrait)
  • Action: What's happening? (e.g., brewing coffee, casting a spell, mid-run through a meadow)
  • Location: Where does the scene take place? (e.g., a futuristic cafe on Mars, a cluttered alchemist's study, a sunlit meadow at golden hour)
  • Style: What's the overall aesthetic? (e.g., 3D animation, film noir, watercolor, photorealistic, 1990s product photography)
  • Editing Instructions: When editing existing images, be direct and specific. (e.g., "change the man's tie to green", "remove the car from the background")
For professional results, include more specific instructions:
  • Composition & Aspect Ratio: Define the canvas (e.g., "9:16 vertical poster", "cinematic 21:9 wide shot")
  • Camera & Lighting: Direct the shot like a cinematographer (e.g., "low-angle shot with shallow depth of field (f/1.8)", "golden hour backlight casting long shadows")
  • Text Integration: Clearly specify text appearance and placement (e.g., "place the headline 'URBAN EXPLORER' at the top in bold, white, sans-serif font")
来源:充分利用Nano Banana Pro的7个技巧 - Google官方博客
在提示词中包含以下元素可获得更好的结果:
  • 主体: 图像中的人物/事物是什么?请具体描述。(例如:"有着发光蓝眼睛的冷峻机器人咖啡师"、"戴着小巫师帽的蓬松三色猫")
  • 构图: 镜头如何取景?(例如:特写镜头、宽幅镜头、低角度镜头、肖像照)
  • 动作: 正在发生什么?(例如:煮咖啡、施法、在草地上奔跑)
  • 场景: 场景发生在何处?(例如:火星上的未来咖啡馆、杂乱的炼金术士工作室、黄金时段的阳光草地)
  • 风格: 整体美学风格是什么?(例如:3D动画、黑色电影、水彩画、写实风格、90年代产品摄影)
  • 编辑指令: 编辑现有图像时,请直接明确地说明需求。(例如:"将男士的领带改为绿色"、"移除背景中的汽车")
若要获得专业级结果,请添加更具体的指令:
  • 构图与宽高比: 定义画布(例如:"9:16竖版海报"、"21:9电影级宽幅镜头")
  • 相机与光线: 像电影摄影师一样指导拍摄(例如:"低角度镜头,浅景深(f/1.8)"、"黄金时段逆光,投射长阴影")
  • 文字整合: 明确指定文字的外观和位置(例如:"将标题'URBAN EXPLORER'放在顶部,使用加粗白色无衬线字体")

Comprehensive Guide

全面指南

Source: Guillaume Vernade, Gemini Developer Advocate, Google DeepMind
来源:Guillaume Vernade,Gemini开发者布道师,Google DeepMind

The Golden Rules of Prompting

提示词黄金法则

Nano-Banana Pro is a "Thinking" model. It doesn't just match keywords; it understands intent, physics, and composition. To get the best results, stop using "tag soups" (e.g., dog, park, 4k, realistic) and start acting like a Creative Director.
1. Edit, Don't Re-roll
The model is exceptionally good at understanding conversational edits. If an image is 80% correct, do not generate a new one from scratch. Instead, simply ask for the specific change you need.
Example: "That's great, but change the lighting to sunset and make the text neon blue."
2. Use Natural Language & Full Sentences
Talk to the model as if you were briefing a human artist. Use proper grammar and descriptive adjectives.
  • Bad: "Cool car, neon, city, night, 8k."
  • Good: "A cinematic wide shot of a futuristic sports car speeding through a rainy Tokyo street at night. The neon signs reflect off the wet pavement and the car's metallic chassis."
3. Be Specific and Descriptive
Vague prompts yield generic results. Define the subject, the setting, the lighting, and the mood.
  • Subject: Instead of "a woman," say "a sophisticated elderly woman wearing a vintage chanel-style suit."
  • Materiality: Describe textures. "Matte finish," "brushed steel," "soft velvet," "crumpled paper."
4. Provide Context (The "Why" or "For whom")
Because the model "thinks," giving it context helps it make logical artistic decisions.
Example: "Create an image of a sandwich for a Brazilian high-end gourmet cookbook." (The model will infer professional plating, shallow depth of field, and perfect lighting).
Nano-Banana Pro是一个会"思考"的模型。它不只是匹配关键词,还能理解意图、物理规则和构图。要获得最佳结果,请停止使用"标签堆砌"(例如:狗、公园、4k、写实),开始像创意总监一样与它沟通。
1. 编辑,而非重新生成
该模型非常擅长理解对话式编辑。如果图像已经有80%符合要求,不要从头生成新图像。只需明确说明你需要的具体修改即可。
示例:"很棒,但请把光线改为日落效果,文字改为霓虹蓝色。"
2. 使用自然语言与完整句子
像给人类艺术家下达指令一样与模型沟通。使用正确的语法和描述性形容词。
  • 错误示例:"酷车,霓虹,城市,夜晚,8k。"
  • 正确示例:"电影级宽幅镜头,一辆未来派跑车在雨夜的东京街道上疾驰。霓虹灯牌的反光映在潮湿的路面和汽车的金属底盘上。"
3. 具体且富有描述性
模糊的提示词会产生通用的结果。定义主体、场景、光线和氛围。
  • 主体:不要说"一个女人",要说"一位身着复古香奈儿风格套装的优雅老年女性"。
  • 材质:描述纹理。"哑光质感"、"拉丝钢"、"柔软天鹅绒"、"皱巴巴的纸"。
4. 提供上下文("为什么"或"为谁")
由于模型会"思考",提供上下文有助于它做出符合逻辑的艺术决策。
示例:"为巴西高端美食食谱创建一张三明治的图片。"(模型会推断出专业的摆盘、浅景深和完美的光线)

Text Rendering, Infographics & Visual Synthesis

文字渲染、信息图表与视觉合成

Nano-Banana Pro has SOTA capabilities for rendering legible, stylized text and synthesizing complex information into visual formats.
Best Practices:
  • Compression: Ask the model to "compress" dense text or PDFs into visual aids.
  • Style: Specify if you want a "polished editorial," a "technical diagram," or a "hand-drawn whiteboard" look.
  • Quotes: Clearly specify the text you want in quotes.
Example Prompts:
Earnings Report Infographic (Data Ingestion):
[Input PDF of Google's latest earnings report]
"Generate a clean, modern infographic summarizing the key financial highlights from this earnings report. Include charts for 'Revenue Growth' and 'Net Income', and highlight the CEO's key quote in a stylized pull-quote box."
Retro Infographic:
"Make a retro, 1950s-style infographic about the history of the American diner. Include distinct sections for 'The Food,' 'The Jukebox,' and 'The Decor.' Ensure all text is legible and stylized to match the period."
Technical Diagram:
"Create an orthographic blueprint that describes this building in plan, elevation, and section. Label the 'North Elevation' and 'Main Entrance' clearly in technical architectural font. Format 16:9."
Whiteboard Summary (Educational):
"Summarize the concept of 'Transformer Neural Network Architecture' as a hand-drawn whiteboard diagram suitable for a university lecture. Use different colored markers for the Encoder and Decoder blocks, and include legible labels for 'Self-Attention' and 'Feed Forward'."
Nano-Banana Pro在渲染清晰、风格化文字以及将复杂信息合成为视觉格式方面具备SOTA(当前最优)能力。
最佳实践:
  • 压缩:要求模型将密集文本或PDF"压缩"为视觉辅助工具。
  • 风格:指定你想要的是"精致编辑风格"、"技术图表"还是"手绘白板"风格。
  • 引用:用引号明确标出你想要的文字内容。
示例提示词:
收益报告信息图表(数据导入):
[输入Google最新收益报告的PDF]
"生成一个简洁现代的信息图表,总结这份收益报告中的关键财务亮点。包含'收入增长'和'净收入'的图表,并以风格化的引用框突出CEO的关键言论。"
复古信息图表:
"制作一个复古的50年代风格信息图表,介绍美国餐厅的历史。包含'食物'、'点唱机'和'装饰'三个不同板块。确保所有文字清晰可读且风格符合那个时代。"
技术图表:
"创建一个正射投影蓝图,从平面图、立面图和剖面图描述这座建筑。用专业建筑字体清晰标注'北立面'和'主入口'。格式为16:9。"
白板总结(教育用途):
"将'Transformer神经网络架构'的概念总结为适合大学讲座的手绘白板图。用不同颜色的标记区分Encoder和Decoder模块,并为'自注意力'和'前馈网络'添加清晰的标签。"

Character Consistency & Viral Thumbnails

角色一致性与爆款缩略图

Nano-Banana Pro supports up to 14 reference images (6 with high fidelity). This allows for "Identity Locking"—placing a specific person or character into new scenarios without facial distortion.
Best Practices:
  • Identity Locking: Explicitly state: "Keep the person's facial features exactly the same as Image 1."
  • Expression/Action: Describe the change in emotion or pose while maintaining the identity.
  • Viral Composition: Combine subjects with bold graphics and text in a single pass.
Example Prompts:
The "Viral Thumbnail" (Identity + Text + Graphics):
"Design a viral video thumbnail using the person from Image 1. Face Consistency: Keep the person's facial features exactly the same as Image 1, but change their expression to look excited and surprised. Action: Pose the person on the left side, pointing their finger towards the right side of the frame. Subject: On the right side, place a high-quality image of a delicious avocado toast. Graphics: Add a bold yellow arrow connecting the person's finger to the toast. Text: Overlay massive, pop-style text in the middle: '3 mins!' Use a thick white outline and drop shadow. Background: A blurred, bright kitchen background. High saturation and contrast."
The "Fluffy Friends" Scenario (Group Consistency):
[Input 3 images of different plush creatures]
"Create a funny 10-part story with these 3 fluffy friends going on a tropical vacation. The story is thrilling throughout with emotional highs and lows and ends in a happy moment. Keep the attire and identity consistent for all 3 characters, but their expressions and angles should vary throughout all 10 images. Make sure to only have one of each character in each image."
Brand Asset Generation:
[Input 1 image of a product]
"Create 9 stunning fashion shots as if they're from an award-winning fashion editorial. Use this reference as the brand style but add nuance and variety to the range so they convey a professional design touch. Please generate nine images, one at a time."
Nano-Banana Pro支持最多14张参考图像(其中6张可实现高保真)。这允许实现"身份锁定"——将特定人物或角色放入新场景中而不出现面部变形。
最佳实践:
  • 身份锁定:明确说明:"保持人物的面部特征与图像1完全一致。"
  • 表情/动作:描述情绪或姿势的变化,同时保持身份不变。
  • 爆款构图:在一次生成中结合主体、醒目图形和文字。
示例提示词:
"爆款视频缩略图"(身份+文字+图形):
"使用图像1中的人物设计一个爆款视频缩略图。面部一致性:保持人物的面部特征与图像1完全一致,但将表情改为兴奋惊讶的样子。动作:将人物放在左侧,手指指向画面右侧。主体:在右侧放置一张高质量的美味牛油果吐司图片。图形:添加一个醒目的黄色箭头,连接人物的手指和吐司。文字:在中间叠加巨大的流行风格文字:'3分钟!'使用粗白色轮廓和投影。背景:模糊的明亮厨房背景。高饱和度和对比度。"
" fluffy friends"场景(群体一致性):
[输入3张不同毛绒生物的图像]
"用这3个 fluffy friends 创建一个有趣的10部分故事,讲述它们的热带假期。整个故事充满惊险,有情绪起伏,最终以快乐的结局收尾。保持所有3个角色的服装和身份一致,但在所有10张图像中,它们的表情和角度可以有所不同。确保每张图像中每个角色只出现一次。"
品牌资产生成:
[输入1张产品图像]
"生成9张惊艳的时尚照片,就像出自获奖时尚编辑之手。以此参考作为品牌风格,但为系列添加细微差别和多样性,以传达专业的设计感。请一次生成一张图像,共九张。"

Advanced Editing, Restoration & Colorization

高级编辑、修复与上色

The model excels at complex edits via conversational prompting. This includes "In-painting" (removing/adding objects), "Restoration" (fixing old photos), "Colorization" (Manga/B&W photos), and "Style Swapping."
Best Practices:
  • Semantic Instructions: You do not need to manually mask; simply tell the model what to change naturally.
  • Physics Understanding: You can ask for complex changes like "fill this glass with liquid" to test physics generation.
Example Prompts:
Object Removal & In-painting:
"Remove the tourists from the background of this photo and fill the space with logical textures (cobblestones and storefronts) that match the surrounding environment."
Manga/Comic Colorization:
[Input black and white manga panel]
"Colorize this manga panel. Use a vibrant anime style palette. Ensure the lighting effects on the energy beams are glowing neon blue and the character's outfit is consistent with their official colors."
Localization (Text Translation + Cultural Adaptation):
[Input image of a London bus stop ad]
"Take this concept and localize it to a Tokyo setting, including translating the tagline into Japanese. Change the background to a bustling Shibuya street at night."
Lighting/Seasonal Control:
[Input image of a house in summer]
"Turn this scene into winter time. Keep the house architecture exactly the same, but add snow to the roof and yard, and change the lighting to a cold, overcast afternoon."
该模型通过对话式提示词擅长复杂编辑。这包括"图像修复"(移除/添加对象)、"图像还原"(修复老照片)、"上色"(漫画/黑白照片)和"风格切换"。
最佳实践:
  • 语义指令:你不需要手动遮罩,只需自然地告诉模型要更改什么。
  • 物理规则理解:你可以要求进行复杂的更改,比如"给这个杯子装满液体"来测试物理生成能力。
示例提示词:
对象移除与图像修复:
"移除这张照片背景中的游客,并用与周围环境匹配的合理纹理(鹅卵石和店面)填充空白区域。"
漫画上色:
[输入黑白漫画面板]
"为这个漫画面板上色。使用鲜艳的动漫风格调色板。确保能量光束的灯光效果是发光的霓虹蓝色,角色的服装颜色与官方设定一致。"
本地化(文字翻译+文化适配):
[输入伦敦公交站广告的图像]
"将这个概念本地化到东京场景,包括将标语翻译成日语。将背景改为夜晚繁华的涩谷街头。"
光线/季节控制:
[输入夏季房屋的图像]
"将这个场景改为冬季。保持房屋结构完全不变,但在屋顶和院子上添加积雪,并将光线改为阴沉的午后冷光。"

Dimensional Translation (2D to 3D)

维度转换(2D转3D)

A powerful new capability is translating 2D schematics into 3D visualizations, or vice versa. This is ideal for interior designers, architects, and meme creators.
Example Prompts:
2D Floor Plan to 3D Interior Design Board:
"Based on the uploaded 2D floor plan, generate a professional interior design presentation board in a single image. Layout: A collage with one large main image at the top (wide-angle perspective of the living area), and three smaller images below (Master Bedroom, Home Office, and a 3D top-down floor plan). Style: Apply a Modern Minimalist style with warm oak wood flooring and off-white walls across ALL images. Quality: Photorealistic rendering, soft natural lighting."
2D to 3D Meme Conversion:
"Turn the 'This is Fine' dog meme into a photorealistic 3D render. Keep the composition identical but make the dog look like a plush toy and the fire look like realistic flames."
一项强大的新功能是将2D示意图转换为3D可视化效果,反之亦然。这非常适合室内设计师、建筑师和表情包创作者。
示例提示词:
2D平面图转3D室内设计板:
"基于上传的2D平面图,在单张图像中生成专业的室内设计展示板。布局:顶部是一张大的主图(客厅的广角视角),下方是三张较小的图像(主卧、家庭办公室和3D俯视图)。风格:在所有图像中应用现代极简风格,搭配温暖的橡木地板和灰白色墙壁。质量:写实渲染,柔和自然光线。"
2D转3D表情包:
"将'This is Fine'狗狗表情包转换为写实3D渲染图。保持构图完全一致,但让狗狗看起来像毛绒玩具,火焰看起来像真实的火焰。"

One-Shot Storyboarding & Concept Art

一次性故事板与概念艺术

You can generate sequential art or storyboards without a grid, ensuring a cohesive narrative flow in a single session. This is also popular for "Movie Concept Art" (e.g., fake leaks of upcoming films).
Example Prompt:
"Create an addictively intriguing 9-part story with 9 images featuring a woman and man in an award-winning luxury luggage commercial. The story should have emotional highs and lows, ending on an elegant shot of the woman with the logo. The identity of the woman and man and their attire must stay consistent throughout but they can and should be seen from different angles and distances. Please generate images one at a time. Make sure every image is in a 16:9 landscape format."
你可以生成连续的艺术作品或故事板,无需网格,确保在单次会话中实现连贯的叙事流程。这也常用于"电影概念艺术"(例如,即将上映电影的假泄露图)。
示例提示词:
"创建一个引人入胜的9部分故事,包含9张图像,展示一对男女在获奖高端行李箱广告中的场景。故事要有情绪起伏,最终以女性手持标志的优雅镜头收尾。男女的身份和服装必须保持一致,但在所有图像中他们的角度和距离可以有所不同。请一次生成一张图像。确保每张图像都是16:9的横向格式。"

Structural Control & Layout Guidance

结构控制与布局引导

Input images aren't limited to character references or subjects to edit. You can use them to strictly control the composition and layout of the final output. This is a game-changer for designers who need to turn a napkin sketch, a wireframe, or a specific grid layout into a polished asset.
Best Practices:
  • Drafts & Sketches: Upload a hand-drawn sketch to define exactly where the text and object should sit.
  • Wireframes: Use screenshots of existing layouts or wireframes to generate high-fidelity UI mockups.
  • Grids: Use grid images to force the model to generate assets for tile-based games or LED displays.
Example Prompts:
Sketch to Final Ad:
"Create a ad for a [product] following this sketch."
UI Mockup from Wireframe:
"Create a mock-up for a [product] following these guidelines."
Pixel Art & LED Displays:
"Generate a pixel art sprite of a unicorn that fits perfectly into this 64x64 grid image. Use high contrast colors."
(Tip: Developers can then programmatically extract the center color of each cell to drive a connected 64x64 LED matrix display).
Sprites:
"Sprite sheet of a woman doing a backflip on a drone, 3x3 grid, sequence, frame by frame animation, square aspect ratio. Follow the structure of the attached reference image exactly."
(Tip: You can then extract each cell and make a gif)
输入图像不仅限于角色参考或要编辑的主体。你可以用它们来严格控制最终输出的构图和布局。这对于需要将餐巾草图、线框或特定网格布局转换为成品资产的设计师来说是革命性的。
最佳实践:
  • 草稿与草图:上传手绘草图,明确定义文字和对象的位置。
  • 线框:使用现有布局或线框的截图生成高保真UI原型。
  • 网格:使用网格图像强制模型为 tile-based 游戏或LED显示屏生成资产。
示例提示词:
草图转最终广告:
"按照这张草图为[产品]创建广告。"
线框转UI原型:
"按照这些指南为[产品]创建原型。"
像素艺术与LED显示屏:
"生成一个适合这个64x64网格图像的独角兽像素艺术精灵。使用高对比度颜色。"
(提示:开发者随后可以通过编程提取每个单元格的中心颜色,来驱动连接的64x64 LED矩阵显示屏)
精灵图:
"一个女性在无人机后空翻的精灵图,3x3网格,序列帧动画,正方形宽高比。严格遵循附加参考图像的结构。"
(提示:你可以提取每个单元格并制作成GIF)

Current Limitations

当前限制

  • Small text, fine details, and accurate spelling may not be perfect
  • Always verify factual accuracy of diagrams and infographics
  • Multilingual text generation may have grammatical errors or lack cultural nuance
  • Advanced edits like compositing or lighting changes may produce unnatural artifacts
  • 小文字、精细细节和准确拼写可能不够完美
  • 请始终验证图表和信息图表中的事实准确性
  • 多语言文字生成可能存在语法错误或缺乏文化细节
  • 高级编辑(如合成或光线变化)可能产生不自然的伪影

Output

输出

  • Images are saved to the specified directory (default:
    ./generated_images
    )
  • Filename format is timestamp (e.g.,
    20251130_153045.png
    ,
    20251130_153045.jpg
    )
  • File extension is automatically determined based on the API response format (PNG/JPEG/WebP)
  • 图像将保存到指定目录(默认:
    ./generated_images
  • 文件名格式为时间戳(例如:
    20251130_153045.png
    20251130_153045.jpg
  • 文件扩展名根据API响应格式自动确定(PNG/JPEG/WebP)

Notes

注意事项

  • The environment variable
    GEMINI_API_KEY
    must be set
  • Nano Banana Pro is a paid API, so charges will apply
  • Generated images include SynthID watermark
  • 必须设置环境变量
    GEMINI_API_KEY
  • Nano Banana Pro是付费API,因此会产生费用
  • 生成的图像包含SynthID水印