Nano Banana 2 图像编辑

google/nano-banana-2/edit

4K 语义级修图。基于自然语言修改现有图像,支持智能光影融合与图像内多语言文字编辑。

示例

Nano Banana 2 图像编辑 example 1

参数

名称类型默认约束说明
images *输入图片image_uploadimage/* · 0–14 items上传最多14张图片进行编辑。AI将根据您的提示词修改这些图片。
prompt *提示词textarea≤ 5000 chars描述您希望如何编辑图片。请具体说明您想要的更改、风格调整或修改内容。
aspect_ratio宽高比select1:1 | 3:2 | 2:3 | 3:4 | 4:3 | 4:5 | 5:4 | 9:16 | …选择输出图片的宽高比。如果不指定,将保持原始宽高比。
resolution分辨率select1k512 | 1k | 2k | 4k选择输出图片的分辨率。更高的分辨率提供更多细节,但处理时间更长。

API

通过统一 REST API 调用本模型;在 API Keys 页获取密钥。

cURL
# 1) Submit — returns { "task_uuid": "..." }
curl -X POST "https://www.namifusion.com/api/v1/marketplace/run/google/nano-banana-2/edit" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "images": [
      "https://assets-public.namifusion.com/uploads/images/2026-03-25/869ddd43c5a6.png",
      "https://assets-public.namifusion.com/uploads/images/2026-03-25/61fdd5b5c158.png",
      "https://assets-public.namifusion.com/uploads/images/2026-03-25/80647d8e9174.png",
      "https://assets-public.namifusion.com/uploads/images/2026-03-25/bea9401654ea.png"
    ],
    "prompt": "Enhance the lighting in the image to create a dramatic effect, adjust the colors to make them more vibrant, and add subtle text overlays in multiple languages.",
    "aspect_ratio": "16:9",
    "resolution": "1k"
  }
}'

# 2) Poll until status is "completed", then read the output URLs
curl "https://www.namifusion.com/api/v1/marketplace/run/tasks/TASK_UUID" \
  -H "Authorization: Bearer YOUR_API_KEY"
Python
import time, requests

API_KEY = "YOUR_API_KEY"
HEADERS = {"Authorization": f"Bearer {API_KEY}"}

# 1) Submit
resp = requests.post(
    "https://www.namifusion.com/api/v1/marketplace/run/google/nano-banana-2/edit",
    headers=HEADERS,
    json={
        "input": {
            "images": [
                "https://assets-public.namifusion.com/uploads/images/2026-03-25/869ddd43c5a6.png",
                "https://assets-public.namifusion.com/uploads/images/2026-03-25/61fdd5b5c158.png",
                "https://assets-public.namifusion.com/uploads/images/2026-03-25/80647d8e9174.png",
                "https://assets-public.namifusion.com/uploads/images/2026-03-25/bea9401654ea.png"
            ],
            "prompt": "Enhance the lighting in the image to create a dramatic effect, adjust the colors to make them more vibrant, and add subtle text overlays in multiple languages.",
            "aspect_ratio": "16:9",
            "resolution": "1k"
        }
    },
)
resp.raise_for_status()  # 401/402/429/5xx stop here instead of polling a bad task
task = resp.json()

# 2) Poll until a terminal state (completed / failed / cancelled).
#    This model is allowed up to 300s server-side.
deadline = time.time() + 360
while task.get("status") not in ("completed", "failed", "cancelled"):
    if time.time() > deadline:
        raise TimeoutError(f"still {task.get('status')} — keep the task_uuid and poll later")
    time.sleep(3)
    poll = requests.get(f"https://www.namifusion.com/api/v1/marketplace/run/tasks/{task['task_uuid']}", headers=HEADERS)
    poll.raise_for_status()
    task = poll.json()

print(task["status"], task.get("output"))
JavaScript
const API_KEY = "YOUR_API_KEY";
const HEADERS = { Authorization: `Bearer ${API_KEY}` };

// 1) Submit
const resp = await fetch("https://www.namifusion.com/api/v1/marketplace/run/google/nano-banana-2/edit", {
  method: "POST",
  headers: { ...HEADERS, "Content-Type": "application/json" },
  body: JSON.stringify({
    "input": {
      "images": [
        "https://assets-public.namifusion.com/uploads/images/2026-03-25/869ddd43c5a6.png",
        "https://assets-public.namifusion.com/uploads/images/2026-03-25/61fdd5b5c158.png",
        "https://assets-public.namifusion.com/uploads/images/2026-03-25/80647d8e9174.png",
        "https://assets-public.namifusion.com/uploads/images/2026-03-25/bea9401654ea.png"
      ],
      "prompt": "Enhance the lighting in the image to create a dramatic effect, adjust the colors to make them more vibrant, and add subtle text overlays in multiple languages.",
      "aspect_ratio": "16:9",
      "resolution": "1k"
    }
  }),
});
if (!resp.ok) throw new Error(`submit failed: ${resp.status} ${await resp.text()}`);
let task = await resp.json();

// 2) Poll until a terminal state (completed / failed / cancelled).
//    This model is allowed up to 300s server-side.
const deadline = Date.now() + 360 * 1000;
while (!["completed", "failed", "cancelled"].includes(task.status)) {
  if (Date.now() > deadline) throw new Error(`still ${task.status} — keep the task_uuid and poll later`);
  await new Promise((r) => setTimeout(r, 3000));
  const poll = await fetch(`https://www.namifusion.com/api/v1/marketplace/run/tasks/${task.task_uuid}`, { headers: HEADERS });
  if (!poll.ok) throw new Error(`poll failed: ${poll.status}`);
  task = await poll.json();
}

console.log(task.status, task.output);

文档

Google Nano Banana 2 Edit

高级图像编辑模型,支持4K输出与快速迭代

Google Nano Banana 2 Edit(Gemini 3.1 Flash Image)是一款先进的图像编辑模型,支持4K分辨率输出,能够快速响应并精准遵循用户指令。该模型支持文本翻译、图像内本地化,并在编辑过程中保持主体一致性。无需冷启动,性能卓越,价格实惠。

🚀 核心功能

  • 自然语言编辑:通过简单的文字描述即可修改图像,模型理解上下文和关系。
  • 多图参考支持:最多可上传14张参考图片,用于复杂编辑和合成。
  • 多分辨率支持:根据需求输出1K、2K或4K分辨率的图片。
  • 灵活宽高比:支持多种宽高比选项,包括1:1、3:2、2:3、3:4、4:3、4:5、5:4、9:16、16:9、21:9、1:4、4:1、1:8、8:1。
  • 提示词优化器:内置工具可自动优化编辑描述。
  • 格式选择:支持PNG和JPEG格式输出。

🛠️ 技术规格

参数描述
输入格式图片(最多14张参考图片)
提示词正向提示词,用于描述所需编辑内容
宽高比可选:1:1、3:2、2:3、3:4、4:3、4:5、5:4、9:16、16:9、21:9、1:4、4:1、1:8、8:1
分辨率默认:1K;可选:0.5K、1K、2K、4K
启用网页搜索默认:False;启用后可利用实时信息增强生成效果
启用图片搜索默认:False;启用后可利用实时图片信息增强生成效果
输出格式默认:PNG;可选:PNG、JPEG

示例提示词

  1. “将男人变成女人。”
  2. “替换背景为海滩场景。”

💰 价格

分辨率价格
0.5K$0.045
1K$0.07
2K$0.105
4K$0.14
网页搜索+$0.014
图片搜索+$0.014

💡 最佳应用场景

  • 角色修改:更改人物属性,如性别、年龄、服饰或外貌。
  • 对象替换:在图像中替换元素,同时保留上下文。
  • 风格迁移:将不同的视觉风格应用于现有图片。
  • 文本编辑:修改图片中的文字,同时保持设计一致性。
  • 场景调整:更改背景、光线或环境元素。

🔗 相关模型

  • Nano Banana 2 Text-to-Image:从文本提示生成图像。
  • Nano Banana Pro Edit:专业版编辑,质量更高。
  • Nano Banana Pro Text-to-Image:专业版图像生成。

通过Google Nano Banana 2 Edit,您可以轻松实现高质量图像编辑,满足多种行业需求。

相关模型

xAI Grok Imagine Image v2.0 图片编辑
Image to ImageX Ai

xAI Grok Imagine Image v2.0 图片编辑

xAI Grok Imagine Image V2.0 Edit 可根据文本提示词对输入图片进行编辑,并支持可配置的分辨率和质量,适用于精细图片编辑、视觉优化、创意变体、社交内容、营销素材和生产工作流。提供开箱即用的 REST 推理 API,性能出色,无冷启动,价格实惠。

$0.090 / 每次
Qwen Image 3.0 Pro Edit|快速图片编辑
Image to ImageQwen Image 3.0 Pro

Qwen Image 3.0 Pro Edit|快速图片编辑

Qwen Image 3.0 Pro Edit 是一款专业级图片编辑模型,具备出色的画质和高级指令理解能力。最高支持 2k。提供开箱即用的 REST inference API,性能优异,无冷启动,价格实惠。

$0.080 / 每次
Image to Image
Image to ImageNamiFusion

图片换头

将照片中的人物头部替换为参考图中的头部。先上传目标照片,再上传头部参考图。

$0.220 / 每次
Nami Qwen I2I Spicy
Image to Image

Nami Qwen I2I Spicy

使用自然语言指令编辑参考图片,并尽量保留未要求修改的内容。

$0.040 / 每次
Nano Banana 图像编辑
Image to ImageGoogle

Nano Banana 图像编辑

高性价比智能修图。 无需蒙版即可实现物体替换与风格迁移,极速响应,成本低廉。

$0.040 / 每次
Nano Banana Pro 图像编辑
Image to ImageGoogle

Nano Banana Pro 图像编辑

4K 语义级修图。基于自然语言修改现有图像,支持智能光影融合与图像内多语言文字编辑。

$0.140 / 每次
Seedream V5.0 Pro Edit 图片编辑与生成 API
Image to ImageDoubao

Seedream V5.0 Pro Edit 图片编辑与生成 API

ByteDance 推出的 Seedream V5.0 Pro Edit 可基于单张图片或多参考图进行图片编辑与生成,最多支持 10 张参考图片,支持宽高比选择以及 1K / 2K 输出档位。开箱即用的 REST 推理 API,性能出色,无冷启动,价格实惠。

$0.050 / 每次
Seedream 5.0 Lite Edit Sequential
Image to ImageDoubao

Seedream 5.0 Lite Edit Sequential

Seedream 5.0 Lite Edit Sequential支持多图编辑,同时锁定角色和物体在不同画面中的一致性。它可以检测主要主体,保持连贯性,并进行受控编辑,支持最高4K输出。提供即用型REST推理API,性能最佳,无冷启动,价格实惠。

$0.040 / 每次