SuperAPI AI 工具集

nano-banana-build

通用与其它

查看项目

更新于 10-16 01:14

技能介绍

用途:通过 google-genai Python SDK 使用 Gemini 专用图像模型(Nano Banana)生成和编辑图像。

主要能力:支持文生图、文本与图像交错生成、主体定制、风格迁移、多轮编辑;Gemini 3 Pro 还涉及思考过程与签名机制。参考材料涵盖模型能力对比(Gemini 2.5 与 3 Pro、分辨率、token 成本)、图像生成、图像编辑、思考过程、示例配方(Logo、贴纸、样机、漫画等)以及 SDK 源码解析。

可用模型:gemini-2.5-flash-image(Nano Banana)速度快、质量高,适合多数场景;gemini-3-pro-image-preview(Nano Banana Pro)保真度最高,支持 2K 和 4K 分辨率、复杂提示遵循与 grounding。

使用方式:先安装并初始化客户端,例如 from google import genai、from google.genai import types、from PIL import Image、import io,然后 client = genai.Client()。快速生成示例:response = client.models.generate_content(model='gemini-2.5-flash-image', contents='A cute robot eating a banana', config=types.GenerateContentConfig(response_modalities=['IMAGE']))。高质量编辑示例: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']))。

适用场景:需要快速生成或编辑图像、进行风格迁移与多轮迭代修改、制作 Logo、贴纸、样机、漫画等视觉内容。

限制:资料未提供具体收费、价格、平台支持范围与效果保证;实际可用性取决于所调用模型与 SDK 环境。