360 Secure SkillHub
360 安全技能中心

Nano Banana Image

该 Skill 说明如何调用 AceDataCloud 的 NanoBanana(基于 Gemini)API:用文本提示生成图像,或用自然语言指令编辑已有图像。支持 nano-banana 与 nano-banana-pro 两种模型及宽高比设置,需配置 API 令牌,也可选用配套 MCP 服务。

Germey
Germey
热度 45.90
最近更新 2026-05-11 17:35:03
分类:创作依赖:代码执行 / 第三方 API / MCP 服务应用场景:图像生成 / API 集成

安装技能

复制下面的话术发给你的 Agent,它会通过 secure-skills 检索并安装该技能。

执行命令安装此 skill: npx secure-skills-cli add acedatacloud-nano-banana-image
Metadata
name
nano-banana-image
description
Generate and edit AI images with NanoBanana (Gemini-based) via AceDataCloud API. Use when creating images from text prompts or editing existing images with text instructions. Supports nano-banana and nano-banana-pro models.
license
Apache-2.0
metadata
{"author":"acedatacloud","version":"1.0"}
compatibility
Requires ACEDATACLOUD_API_TOKEN environment variable. Optionally pair with mcp-nano-banana for tool-use.

NanoBanana Image Generation

Generate and edit AI images through AceDataCloud's NanoBanana (Gemini-based) API.

Authentication

export ACEDATACLOUD_API_TOKEN="your-token-here"

Quick Start

curl -X POST https://api.acedata.cloud/nano-banana/images \
  -H "Authorization: Bearer $ACEDATACLOUD_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"prompt": "a watercolor painting of a French countryside village", "model": "nano-banana"}'

Models

Model Best For
nano-banana Standard image generation (default)
nano-banana-pro Higher quality, more detailed output

Workflows

1. Text-to-Image

POST /nano-banana/images
{
  "prompt": "a photorealistic macro shot of morning dew on a spider web",
  "model": "nano-banana-pro",
  "aspect_ratio": "16:9"
}

2. Image Editing

Edit an existing image using natural language instructions — no mask needed.

POST /nano-banana/images/edit
{
  "prompt": "change the background to a starry night sky",
  "image_url": "https://example.com/photo.jpg",
  "model": "nano-banana"
}

Parameters

Generation

Parameter Values Description
model "nano-banana", "nano-banana-pro" Model to use
aspect_ratio "1:1", "3:4", "4:3", "9:16", "16:9" Output aspect ratio

Editing

Parameter Required Description
image_url Yes URL of the source image
prompt Yes Natural language editing instruction
model No Model to use (defaults to "nano-banana")
aspect_ratio No Output aspect ratio

MCP Server

pip install mcp-nano-banana

Or hosted: https://nano-banana.mcp.acedata.cloud/mcp

Key tools: nano_banana_generate_image, nano_banana_edit_image

Gotchas

  • Editing does NOT require a mask — just describe the change in natural language
  • nano-banana-pro produces significantly more detailed results but costs more
  • Results return a direct image URL — no task polling needed
  • Aspect ratio uses colon notation (e.g., "16:9") not pixel dimensions
  • The Gemini-based model excels at understanding complex, conversational editing instructions