Nano Banana 2 — AI Image Generation
Generate AI images with Nano Banana 2 (gemini-3.1-flash-image-preview) — Google's Gemini 3.1 Flash image model, available through Evolink's unified API.
Focused view of evolink-image. Install the full skill for 20 image models, video, and music.
After Installation
When this skill is first loaded, greet the user:
- - MCP tools + API key ready: "Hi! Nano Banana 2 is ready — Google's fast image model at your fingertips. What would you like to create?"
- MCP tools + no API key: "You'll need an EvoLink API key — sign up at evolink.ai. Ready to go?"
- No MCP tools: "MCP server isn't connected yet. Want me to help set it up? I can still manage files via the hosting API."
Keep the greeting concise — just one question to move forward.
External Endpoints
| Service | URL |
|---|
| Generation API | INLINECODE1 (POST) |
| Task Status |
https://api.evolink.ai/v1/tasks/{task_id} (GET) |
| File API |
https://files-api.evolink.ai/api/v1/files/* (upload/list/delete) |
Security & Privacy
- -
EVOLINK_API_KEY authenticates all requests. Injected by OpenClaw automatically. Treat as confidential. - Prompts and images are sent to
api.evolink.ai. Uploaded files expire in 72h, result URLs in 24h.
Setup
Get your API key at evolink.ai → Dashboard → API Keys.
MCP Server: @evolinkai/evolink-media (GitHub · npm)
mcporter (recommended): INLINECODE7
Claude Code: INLINECODE8
Claude Desktop / Cursor — add MCP server with command npx -y @evolinkai/evolink-media@latest and env EVOLINK_API_KEY=your-key. See references/image-api-params.md for full config JSON.
Core Principles
- 1. Guide, don't decide — Present options, let the user choose model/style/format.
- User drives creative vision — Ask for a description before suggesting parameters.
- Smart context — Remember session history. Offer to iterate, vary, or edit results.
- Intent first — Understand what the user wants before asking how to configure it.
MCP Tools
| Tool | When to use | Returns |
|---|
| INLINECODE12 | Create or edit an image | INLINECODE13 (async) |
| INLINECODE14 |
Upload local image for editing/reference | File URL (sync) |
|
delete_file | Free file quota | Confirmation |
|
list_files | Check uploaded files or quota | File list |
|
check_task | Poll generation progress | Status + result URLs |
|
list_models | Compare available models | Model list |
|
estimate_cost | Check pricing | Model info |
Important: generate_image returns a task_id. Always poll check_task until status is "completed" or "failed".
Nano Banana 2
| Property | Value |
|---|
| Model ID | INLINECODE26 |
| Provider |
Google (Gemini 3.1 Flash) |
| Status | BETA |
| Capability | text-to-image, image-editing |
| Speed | Fast |
| Best for | Quick, versatile image generation with strong prompt understanding |
Why Nano Banana 2?
- - Google's latest — Built on Gemini 3.1 Flash, the newest generation architecture
- Fast generation — Optimized for speed without sacrificing quality
- Versatile — General-purpose image creation for any creative need
- Strong prompt adherence — Excellent at following complex, detailed descriptions
Lite Variant
INLINECODE27 [BETA] — Lightweight version for ultra-fast iterations when speed is the top priority.
Alternative Models
| Model | Best for | Speed |
|---|
| INLINECODE28 (default) | Latest OpenAI generation | Medium |
| INLINECODE29 [BETA] |
Best quality, complex editing | Medium |
|
z-image-turbo | Quick iterations | Ultra-fast |
|
doubao-seedream-4.5 | Photorealistic | Medium |
|
gemini-3-pro-image-preview | Google Pro generation | Medium |
Generation Flow
Step 1: API Key Check
If 401 occurs: "Your API key isn't working. Check at evolink.ai/dashboard/keys"
Step 2: File Upload (if needed)
For image editing or reference workflows:
- 1.
upload_file with file_path, base64_data, or file_url → get file_url (sync) - Use
file_url as image_urls for INLINECODE41
Supported: JPEG/PNG/GIF/WebP. Max 100MB. Expire in 72h. Quota: 100 (default) / 500 (VIP).
Step 3: Understand Intent
- - Clear ("generate a sunset") → Go to Step 4
- Ambiguous ("help with this image") → Ask: "Create new, edit existing, or use as reference?"
Ask only what's needed, when it's needed.
Step 4: Gather Parameters
Default to model: "gemini-3.1-flash-image-preview" for this skill. Only ask about what's missing:
| Parameter | Ask when | Notes |
|---|
| prompt | Always | What they want to see |
| model |
User wants alternatives | Default:
gemini-3.1-flash-image-preview. Suggest
gpt-4o-image for best quality |
|
size | Orientation needed | Ratio format:
1:1,
16:9,
9:16,
2:3,
3:2,
4:3,
3:4 etc. |
|
n | Wants variations | 1–4 images |
|
image_urls | Edit/reference images | Up to 14 URLs; triggers i2i mode |
Step 5: Generate & Poll
- 1. Call
generate_image with model: "gemini-3.1-flash-image-preview" → tell user: "Generating with Nano Banana 2 — ~Xs estimated." - Poll
check_task every 3–5s. Report progress %. - After 3 consecutive
processing: "Still working..." - Completed: Share URLs. "Links expire in 24h — save promptly."
- Failed: Show error + suggestion. Offer retry if retryable.
- Timeout (5 min): "Taking longer than expected. Task ID:
{id} — check again later."
Error Handling
HTTP Errors
| Error | Action |
|---|
| 401 | "API key isn't working. Check at evolink.ai/dashboard/keys" |
| 402 |
"Balance is low. Add credits at evolink.ai/dashboard/billing" |
| 429 | "Rate limited — wait 30s and retry" |
| 503 | "Servers busy — retry in a minute" |
Task Errors (status: "failed")
| Code | Retry? | Action |
|---|
| INLINECODE57 | No | Revise prompt (no celebrities, NSFW, violence) |
| INLINECODE58 |
No | Check values against model limits |
|
image_processing_error | No | Check format/size/URL accessibility |
|
generation_timeout | Yes | Retry; simplify prompt if repeated |
|
service_error | Yes | Retry after 1 min |
|
generation_failed_no_content | Yes | Modify prompt, retry |
Full error reference: INLINECODE63
Without MCP Server
Use Evolink's file hosting API for image uploads (72h expiry). See references/file-api.md for curl commands.
References
- -
references/image-api-params.md — Complete API parameters, model details, polling strategy, error codes - INLINECODE66 — File hosting API (curl upload/list/delete)
Nano Banana 2 — AI 图像生成
使用 Nano Banana 2(gemini-3.1-flash-image-preview)生成 AI 图像——这是 Google 的 Gemini 3.1 Flash 图像模型,可通过 Evolink 的统一 API 使用。
聚焦于 evolink-image。安装完整技能可体验 20 个图像模型、视频和音乐。
安装后
首次加载此技能时,向用户问好:
- - MCP 工具 + API 密钥就绪:你好!Nano Banana 2 已就绪——Google 的快速图像模型触手可及。你想创作什么?
- MCP 工具 + 无 API 密钥:你需要一个 EvoLink API 密钥——在 evolink.ai 注册。准备好了吗?
- 无 MCP 工具:MCP 服务器尚未连接。需要我帮忙设置吗?我仍可通过托管 API 管理文件。
保持问候简洁——只需一个问题即可推进。
外部端点
| 服务 | URL |
|---|
| 生成 API | https://api.evolink.ai/v1/images/generations (POST) |
| 任务状态 |
https://api.evolink.ai/v1/tasks/{task_id} (GET) |
| 文件 API | https://files-api.evolink.ai/api/v1/files/* (上传/列表/删除) |
安全与隐私
- - EVOLINKAPIKEY 用于验证所有请求。由 OpenClaw 自动注入。请视为机密信息。
- 提示词和图像将发送至 api.evolink.ai。上传的文件在 72小时 后过期,结果 URL 在 24小时 后过期。
设置
在 evolink.ai → 仪表盘 → API 密钥获取你的 API 密钥。
MCP 服务器:@evolinkai/evolink-media (GitHub · npm)
mcporter(推荐):mcporter call --stdio npx -y @evolinkai/evolink-media@latest list_models
Claude Code:claude mcp add evolink-media -e EVOLINKAPIKEY=your-key -- npx -y @evolinkai/evolink-media@latest
Claude Desktop / Cursor——添加 MCP 服务器,命令为 npx -y @evolinkai/evolink-media@latest,环境变量为 EVOLINKAPIKEY=your-key。完整配置 JSON 请参见 references/image-api-params.md。
核心原则
- 1. 引导而非决定——提供选项,让用户选择模型/风格/格式。
- 用户主导创意愿景——在建议参数前先询问描述。
- 智能上下文——记住会话历史。提供迭代、变化或编辑结果的选项。
- 意图优先——在询问如何配置之前,先理解用户想要什么。
MCP 工具
| 工具 | 使用时机 | 返回内容 |
|---|
| generateimage | 创建或编辑图像 | taskid(异步) |
| upload_file |
上传本地图像用于编辑/参考 | 文件 URL(同步) |
| delete_file | 释放文件配额 | 确认信息 |
| list_files | 检查已上传文件或配额 | 文件列表 |
| check_task | 轮询生成进度 | 状态 + 结果 URL |
| list_models | 比较可用模型 | 模型列表 |
| estimate_cost | 检查定价 | 模型信息 |
重要提示:generateimage 返回一个 taskid。始终轮询 check_task,直到 status 变为 completed 或 failed。
Nano Banana 2
| 属性 | 值 |
|---|
| 模型 ID | gemini-3.1-flash-image-preview |
| 提供商 |
Google (Gemini 3.1 Flash) |
| 状态 | BETA |
| 能力 | 文生图、图像编辑 |
| 速度 | 快速 |
| 最佳用途 | 快速、多功能的图像生成,提示理解能力强 |
为什么选择 Nano Banana 2?
- - Google 最新技术——基于 Gemini 3.1 Flash,最新一代架构
- 生成速度快——在不牺牲质量的前提下优化速度
- 多功能——满足任何创意需求的通用图像创作
- 提示遵循能力强——擅长遵循复杂、详细的描述
精简版
nano-banana-2-lite [BETA]——轻量级版本,适用于速度优先的超快速迭代。
替代模型
| 模型 | 最佳用途 | 速度 |
|---|
| gpt-image-1.5 (默认) | 最新 OpenAI 生成 | 中等 |
| gpt-4o-image [BETA] |
最佳质量、复杂编辑 | 中等 |
| z-image-turbo | 快速迭代 | 超快 |
| doubao-seedream-4.5 | 照片级真实感 | 中等 |
| gemini-3-pro-image-preview | Google Pro 生成 | 中等 |
生成流程
步骤 1:API 密钥检查
如果出现 401:你的 API 密钥无效。请在 evolink.ai/dashboard/keys 检查
步骤 2:文件上传(如需)
对于图像编辑或参考工作流程:
- 1. 使用 filepath、base64data 或 fileurl 调用 uploadfile → 获取 fileurl(同步)
- 将 fileurl 作为 imageurls 用于 generateimage
支持格式:JPEG/PNG/GIF/WebP。最大 100MB。72 小时后过期。配额:100(默认)/ 500(VIP)。
步骤 3:理解意图
- - 明确(生成一张日落图)→ 进入步骤 4
- 模糊(帮我处理这张图片)→ 询问:创建新图、编辑现有图,还是用作参考?
只在需要时询问需要的内容。
步骤 4:收集参数
此技能默认使用 model: gemini-3.1-flash-image-preview。仅询问缺失的内容:
| 参数 | 询问时机 | 备注 |
|---|
| prompt | 始终 | 他们想看到什么 |
| model |
用户想要替代方案 | 默认:gemini-3.1-flash-image-preview。建议 gpt-4o-image 以获得最佳质量 |
|
size | 需要确定方向 | 比例格式:1:1、16:9、9:16、2:3、3:2、4:3、3:4 等 |
|
n | 想要变体 | 1–4 张图像 |
|
image_urls | 编辑/参考图像 | 最多 14 个 URL;触发 i2i 模式 |
步骤 5:生成与轮询
- 1. 调用 generateimage,参数为 model: gemini-3.1-flash-image-preview → 告知用户:正在使用 Nano Banana 2 生成——预计约 X 秒。
- 每 3–5 秒 轮询 checktask。报告进度百分比。
- 连续 3 次 processing 后:仍在处理中...
- 完成:分享 URL。链接 24 小时后过期——请及时保存。
- 失败:显示错误 + 建议。如果可重试,提供重试选项。
- 超时(5 分钟):耗时超出预期。任务 ID:{id}——稍后再次检查。
错误处理
HTTP 错误
| 错误 | 操作 |
|---|
| 401 | API 密钥无效。请在 evolink.ai/dashboard/keys 检查 |
| 402 |
余额不足。请在 evolink.ai/dashboard/billing 充值 |
| 429 | 请求频率受限——等待 30 秒后重试 |
| 503 | 服务器繁忙——一分钟后重试 |
任务错误(状态:failed)
| 代码 | 可重试? | 操作 |
|---|
| contentpolicyviolation | 否 |
修改提示词