nano-banana-image
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseNanoBanana Image Generation
NanoBanana 图像生成
Generate and edit AI images through AceDataCloud's NanoBanana (Gemini-based) API.
Setup: See authentication for token setup.
通过AceDataCloud的基于Gemini的NanoBanana API生成和编辑AI图像。
设置: 请查看身份验证了解令牌设置方法。
Quick Start
快速开始
bash
curl -X POST https://api.acedata.cloud/nano-banana/images \
-H "Authorization: Bearer $ACEDATACLOUD_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"action": "generate", "prompt": "a watercolor painting of a French countryside village", "model": "nano-banana"}'Async: See async task polling. Poll viawithPOST /nano-banana/tasks.{"id": "..."}
bash
curl -X POST https://api.acedata.cloud/nano-banana/images \
-H "Authorization: Bearer $ACEDATACLOUD_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"action": "generate", "prompt": "a watercolor painting of a French countryside village", "model": "nano-banana"}'异步操作: 请查看异步任务轮询。通过接口并传入POST /nano-banana/tasks进行轮询。{"id": "..."}
Models
模型
| Model | Best For |
|---|---|
| Standard image generation (default) |
| Improved quality, second generation |
| Highest quality, most detailed output |
| Official channel variant of |
| Official channel variant of |
| Official channel variant of |
| 模型 | 适用场景 |
|---|---|
| 标准图像生成(默认) |
| 第二代模型,画质提升 |
| 最高画质,细节最丰富 |
| |
| |
| |
Workflows
工作流程
1. Text-to-Image
1. 文本转图像
json
POST /nano-banana/images
{
"action": "generate",
"prompt": "a photorealistic macro shot of morning dew on a spider web",
"model": "nano-banana-pro",
"aspect_ratio": "16:9",
"resolution": "2K"
}json
POST /nano-banana/images
{
"action": "generate",
"prompt": "a photorealistic macro shot of morning dew on a spider web",
"model": "nano-banana-pro",
"aspect_ratio": "16:9",
"resolution": "2K"
}2. Image Editing
2. 图像编辑
Edit existing images using natural language instructions — no mask needed. Pass source images via .
image_urlsjson
POST /nano-banana/images
{
"action": "edit",
"prompt": "change the background to a starry night sky",
"image_urls": ["https://example.com/photo.jpg"],
"model": "nano-banana"
}使用自然语言指令编辑现有图像——无需蒙版。通过传入源图像。
image_urlsjson
POST /nano-banana/images
{
"action": "edit",
"prompt": "change the background to a starry night sky",
"image_urls": ["https://example.com/photo.jpg"],
"model": "nano-banana"
}Parameters
参数说明
| Parameter | Values | Description |
|---|---|---|
| | Operation mode |
| | Model to use |
| string | Image description or editing instruction |
| array of strings | Source image URLs (required for edit action) |
| | Output aspect ratio |
| | Output resolution (1K=1024px, 2K=2048px, 4K=4096px) |
| string | Async callback URL; returns a task ID immediately |
| 参数 | 可选值 | 说明 |
|---|---|---|
| | 操作模式 |
| | 使用的模型 |
| 字符串 | 图像描述或编辑指令 |
| 字符串数组 | 源图像URL(编辑操作必填) |
| | 输出图像宽高比 |
| | 输出分辨率(1K=1024px,2K=2048px,4K=4096px) |
| 字符串 | 异步回调URL;会立即返回任务ID |
Gotchas
注意事项
- Editing does NOT require a mask — just describe the change in natural language
- Editing uses the same endpoint with
/nano-banana/imagesandaction: "edit"array (not a separateimage_urlspath)/edit - is the second-generation model;
nano-banana-2offers the highest qualitynano-banana-pro - variants (e.g.,
:official) route through the official channelnano-banana:official - Task polling uses (not
id) in thetask_idrequest body/nano-banana/tasks - Aspect ratio uses colon notation (e.g., ) not pixel dimensions
"16:9" - The Gemini-based model excels at understanding complex, conversational editing instructions
MCP:| Hosted:pip install mcp-nano-banana| See all MCP servershttps://nano-banana.mcp.acedata.cloud/mcp
- 编辑操作无需蒙版,只需用自然语言描述修改内容即可
- 编辑操作使用同一个接口,只需设置
/nano-banana/images并传入action: "edit"数组(无需单独的image_urls路径)/edit - 是第二代模型;
nano-banana-2提供最高画质nano-banana-pro - 变体(如
:official)通过官方渠道处理请求nano-banana:official - 任务轮询时,需在请求体中使用
/nano-banana/tasks(而非id)task_id - 宽高比使用冒号格式(如),而非像素尺寸
"16:9" - 基于Gemini的模型擅长理解复杂的对话式编辑指令
MCP:| 托管地址:pip install mcp-nano-banana| 查看所有MCP服务器https://nano-banana.mcp.acedata.cloud/mcp