CheaperGen
Google图像热门

Nano Banana Pro 图像编辑 API

由 Google 提供 图像编辑 与 Nano Banana Pro。Gemini 3 Pro Image——影棚级图像生成与编辑,最高 4K。

试用 Nano Banana Pro 图像编辑

0/5000

最多使用 14 张图像进行编辑或合成(产品、人物或风格)。在提示词中使用“图像 1”“图像 2”…来引用。

输出图像比例。

输出尺寸:1K ≈ 1 百万像素,2K ≈ 4 MP,4K ≈ 16 MP。

预计费用…

使用 Google 或电子邮箱免费创建账户,只为你生成的内容付费。

你的 图像 会显示在这里

输入提示词,选择设置,然后点击“运行”。仅成功生成的结果会收费。

还可查看:Nano Banana Pro 文生图

查看 Nano Banana Pro 示例和提示词

Nano Banana Pro 图像编辑 API

POST/api/v1/run/google/nano-banana-pro/edit

提交异步任务并返回 202 和生成任务 ID。请轮询 GET /api/v1/generations/{id} 或传入 webhook_url。参见 任务生命周期。

输入参数

名称类型说明影响价格
prompt必填string描述镜头,包括主体、动作、镜头运动、光线和风格。否
image_urls必填string[] (URLs)最多使用 14 张图像进行编辑或合成(产品、人物或风格)。在提示词中使用“图像 1”“图像 2”…来引用。
最多数量:14
否
aspect_ratiostring (enum)输出图像比例。
可选值:1:1 · 2:3 · 3:2 · 3:4 · 4:3 · 4:5 · 5:4 · 9:16 · 16:9 · 21:9
默认值:1:1
是
resolutionstring (enum)输出尺寸:1K ≈ 1 百万像素,2K ≈ 4 MP,4K ≈ 16 MP。
可选值:1K · 2K · 4K
默认值:1K
是
webhook_urlstring (URL)可选。生成完成后,我们会在此地址 POST 结果,并使用你的 Webhook 密钥进行签名。Webhooks否

请求

const API = "https://cheapergen.com/api/v1";
const headers = {
  Authorization: `Bearer ${process.env.CHEAPERGEN_API_KEY}`,
  "Content-Type": "application/json",
};

// 1. Submit the job
let job = await fetch(`${API}/run/google/nano-banana-pro/edit`, {
  method: "POST",
  headers,
  body: JSON.stringify({
    "prompt": "将图像 1 中的产品放在图像 2 的大理石台面上,并匹配柔和的晨光",
    "image_urls": [
      "https://cdn.cheapergen.com/samples/portrait.jpg"
    ],
    "aspect_ratio": "1:1",
    "resolution": "1K"
  }),
}).then((r) => r.json());

// 2. Poll until it finishes (or pass webhook_url and skip polling)
while (job.status === "queued" || job.status === "running") {
  await new Promise((r) => setTimeout(r, 3000));
  job = await fetch(`${API}/generations/${job.id}`, { headers }).then((r) => r.json());
}

console.log(job.status === "succeeded" ? job.output.images[0].url : job.error);

响应

{
  "id": "gen_8c2QmX1nq0k4",
  "object": "generation",
  "model": "google/nano-banana-pro",
  "endpoint": "google/nano-banana-pro/edit",
  "mode": "edit",
  "status": "queued",
  "input": {
    "prompt": "将图像 1 中的产品放在图像 2 的大理石台面上,并匹配柔和的晨光",
    "image_urls": [
      "https://cdn.cheapergen.com/samples/portrait.jpg"
    ],
    "aspect_ratio": "1:1",
    "resolution": "1K"
  },
  "output": null,
  "error": null,
  "cost": {
    "amount_usd": 0.2255,
    "currency": "usd",
    "estimated": true,
    "official_usd": null,
    "list_price_source": "official",
    "list_price_label": "Official",
    "saved_usd": null
  },
  "source": "api",
  "started_at": null,
  "completed_at": null,
  "urls": {
    "get": "https://cheapergen.com/api/v1/generations/gen_8c2QmX1nq0k4",
    "cancel": "https://cheapergen.com/api/v1/generations/gen_8c2QmX1nq0k4/cancel"
  },
  "created_at": "2026-10-15T09:21:04Z"
}

Nano Banana Pro 定价

按 每张图像 按量付费,无需订阅。生成失败会自动退款。

档位官方价格CheaperGen
1K
约 1 MP
$0.138/img$0.1197/img
订阅月度套餐后: Pro $0.1177Max $0.1156
2K
约 4 MP
$0.138/img$0.1197/img
订阅月度套餐后: Pro $0.1177Max $0.1156
4K
约 16 MP
$0.244/img$0.1995/img
订阅月度套餐后: Pro $0.1928Max $0.186

月度套餐 可降低大多数模型的价格(各价格下方会显示);你仍可按量付费。Pro 每月 $499 · Max 每月 $4,999.

  • 官方价格:Gemini API 的 gemini-3-pro-image 目录价(每 1M 图像输出 Token $120:1K 或 2K 图像 $0.134/张,4K 图像 $0.24/张;每张输入图像 560 Token,费率为每 1M $2;思考 Token 每 1M $12,每张图像约 $0.004)。价格核实于 2026年10月18日。
  • 价格包含提示词和模型的推理 Token;每张输入图像约额外收取 $0.002。

在同一个 API 密钥下查看热门 Google 模型。

所有 Google 模型

热门 text-to-image 模型 来自其他开发者。

文生图 API