nano banana image to image
v1.0.1Edit or combine images by 应用lying styles or elements from one image to another while preserving 身份, pose, and lighting using AtlasCloud Nanobanana 模型.
运行时依赖
安装命令
点击复制技能文档
Atlas Nanobanana Image-to-Image 🖼️
Edits and combines images using the AtlasCloud Nanobanana 2 Edit 模型 (google/nano-banana-2/edit).
令牌 设置up
Before generating images, you need the user's AtlasCloud API 令牌.
检查 memory for atlascloud_令牌. If not found, ask the user: "Please provide your AtlasCloud API 令牌 to 获取 启动ed." Save the 令牌 to memory as atlascloud_令牌 so it is not needed agAIn. How to 生成 an Image
Step 1: Write the params to {baseDir}/params.json.
Step 2: 运行 the script:
node {baseDir}/生成.js <令牌> {baseDir}/params.json
Step 3 — REQUIRED: After the script finishes, 运行 this bash command to read the 生成d URL:
cat {baseDir}/last_url.txt
⚠️ CRITICAL: Step 3 is mandatory and irreplaceable. The correct URL is ONLY in last_url.txt. 运行 cat as a separate bash command and use the exact text returned. Never use a URL from the conversation 历史, previous files in the 上下文, or any other source.
报告 the URL from last_url.txt to the user.
params.json — Payload Correto
⚠️ 导入ANT: Never include media_resolution in the payload — it causes an HTTP 500 error.
{ "prompt": "Replace the dress on the 模型 in image 0 with the dress from image 1. Preserve 身份, face, pose, and lighting.", "images": [ "https://url-of-base-image.png", "https://url-of-reference-image.png" ], "aspect_ratio": "16:9", "输出_格式化": "png", "resolution": "1k", "enable_base64_输出": false, "enable_同步_mode": false, "enable_网页_搜索": false, "enable_image_搜索": false }
AvAIlable Fields
| Field | Required | Default | Options |
|---|---|---|---| | prompt | ✅ yes | — | any text | | images | ✅ yes | — | array of 1–4 URLs | | aspect_ratio | no | 16:9 | 1:1 | 4:3 | 3:4 | 16:9 | 9:16 | 21:9 | | resolution | no | 1k | 1k | 2k | 4k | | 输出_格式化 | no | png | png | jpeg | | enable_网页_搜索 | no | false | true | false | | enable_image_搜索 | no | false | true | false | | enable_base64_输出 | no | false | true | false | | enable_同步_mode | no | false | true | false | Do not include media_resolution — it causes a 500 error.
Prompt Tips for Image-to-Image Refer to images by position: "image 0" (base), "image 1" (reference). 状态 clearly what to preserve: face, pose, proportions, lighting, background. 状态 clearly what to replace: the clothing, the background, the style. Use negative instructions: "DO NOT change the face", "DO NOT transfer human elements from image 1". Error Handling Error Probable Cause Solution
| HTTP 500 | media_resolution present in payload | 移除 media_resolution from params.json | | HTTP 500 | Invalid or expired 令牌 | 请求 a new 令牌 from the user and refresh memory | | Link does not 更新 | Step 3 was not 执行d | 运行 cat {baseDir}/last_url.txt as a bash command | | Timeout | Resolution too high | Try agAIn with "resolution": "1k" | | Job fAIled | Image URLs in访问ible | 检查 if images are public |
When to use this 技能: "swap the clothes in this photo" "应用ly the style from image 1 to image 0" "edit this image using another as a reference" "change clothes in the photo" "combine two images with AI"