模型指南

Nano Banana Pro API:每张图片价格和可运行的代码

Nano Banana Pro 是 Google 的 Gemini 3 Pro Image 模型,以图像内文字清晰可读以及能把多张输入图片合成一张而著称。下面介绍它接受什么输入、一张图片的费用,以及如何调用。

Nano Banana Pro 擅长什么

Google 于 2025 年 11 月发布了 Nano Banana Pro,即其 Gemini 3 Pro Image 模型。当图片需要承载文字或组合多个来源时,请使用它:

  • 图像内的文字。海报、包装、菜单、信息图和界面样机,这些场景里标题必须清晰可读。
  • 一张图中使用多个输入。最多 14 张输入图片:产品、徽标、模特、地点和风格参考都可以放进同一个请求。
  • 精确编辑。修改背景、某个物体的颜色或一天中的时间,而图片的其余部分保持原样。
  • 大尺寸输出。1K、2K 和 4K,支持 10 种宽高比。

没有任何图像模型在文字方面是完美的。短标题最可靠;长段落和小字更难处理。发布之前请校对每张图片。

输入与限制

选项Nano Banana Pro
模型 idnano-banana-pro
任务文生图和图像编辑
分辨率1K、2K 和 4K
宽高比1:1、16:9、9:16、4:3、3:4、3:2、2:3、5:4、4:5 和 21:9
输入图片一张待编辑的图片通过 image_url 传入,或最多 14 张通过 image_urls
线路一条线路

请求格式与视频模型相同,只是没有 duration 和 audio。模型不支持的取值,会在任何扣费之前以 422 被拒绝。

Nano Banana Pro 价格(2026 年 10 月)

Nano Banana Pro 按生成的图片计费。以下是 2026 年 10 月的目录价格:

Nano Banana Pro 的每张图片价格
分辨率每张图片100 张图片1,000 张图片
1K$0.04$4.00$40.00
2K$0.04$4.00$40.00
4K$0.08$8.00$80.00

提交任务时,价格会从你的预付余额中预留,只有图片交付后才会扣费。如果任务失败,预留会被释放。实际扣费金额会作为 cost_usd 返回。额度包 $10 起;见价格页面。这比 Google 自家 Gemini API 在 2K 下的价格低 70%;Nano Banana Pro 价格对比中有各卖方的价格。

其他 Nano Banana 模型

Google 更轻量的 Nano Banana 模型在 Revana 上也有,使用同一个密钥。Nano Banana 2 是 2026 年 2 月发布的 Gemini 3.1 Flash Image;初代 Nano Banana 是 Gemini 2.5 Flash Image。

Nano Banana 模型对比
模型分辨率宽高比起价 / 张线路
Nano Banana Pro1K、2K 和 4K10$0.04一条线路
Nano Banana 20.5K、1K、2K 和 4K14$0.03两条线路
Nano Banana 2.11K、2K 和 4K14$0.03三条线路
Nano Banana 2 Lite1K10$0.02两条线路
Nano Banana未列出未列出$0.03一条线路

用 Nano Banana Pro 生成图片

发送 POST /v1/generations,带上 "model": "nano-banana-pro" 和提示词。图像任务通常几秒内完成,但流程与视频相同:提交,得到带有 id 的 202,然后轮询。这张 2K 海报的费用为 $0.04。

cURL
export REVANA_API_KEY="sr_live_..."

# 1. Submit the job (returns 202 with the generation id)
curl https://api.revana.si/v1/generations \
  -H "Authorization: Bearer $REVANA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "nano-banana-pro",
    "input": {
      "prompt": "A minimalist concert poster for a jazz night. Large headline at the top in a bold condensed sans-serif: \"BLUE HOUR SESSIONS\". Below it, smaller: \"Friday 8 PM, Harbour Hall\". A saxophone drawn in thin gold lines on a deep navy background.",
      "resolution": "2K",
      "aspect_ratio": "4:5"
    },
    "max_cost_usd": 0.1
  }'

# 2. Poll with the id from step 1 until status is "succeeded" or "failed"
curl https://api.revana.si/v1/generations/gen_01JBX7Q2M4 \
  -H "Authorization: Bearer $REVANA_API_KEY"
Python
import os
import time

import requests

API = "https://api.revana.si/v1"
HEADERS = {"Authorization": f"Bearer {os.environ['REVANA_API_KEY']}"}

resp = requests.post(f"{API}/generations", headers=HEADERS, json={
    "model": "nano-banana-pro",
    "input": {
        "prompt": "A minimalist concert poster for a jazz night. Large headline at the top in a bold condensed sans-serif: \"BLUE HOUR SESSIONS\". Below it, smaller: \"Friday 8 PM, Harbour Hall\". A saxophone drawn in thin gold lines on a deep navy background.",
        "resolution": "2K",
        "aspect_ratio": "4:5",
    },
    "max_cost_usd": 0.1,
})
resp.raise_for_status()
job = resp.json()

while job["status"] in ("queued", "running"):
    time.sleep(5)
    job = requests.get(f"{API}/generations/{job['id']}", headers=HEADERS).json()

if job["status"] == "succeeded":
    print(job["output"]["urls"], job["cost_usd"])
else:
    print("Failed:", job["error"])
Node.js
// Node 18 or later. Save as generate.mjs and run: node generate.mjs
const API = "https://api.revana.si/v1";
const headers = {
  Authorization: `Bearer ${process.env.REVANA_API_KEY}`,
  "Content-Type": "application/json",
};

const res = await fetch(`${API}/generations`, {
  method: "POST",
  headers,
  body: JSON.stringify({
    model: "nano-banana-pro",
    input: {
      prompt: "A minimalist concert poster for a jazz night. Large headline at the top in a bold condensed sans-serif: \"BLUE HOUR SESSIONS\". Below it, smaller: \"Friday 8 PM, Harbour Hall\". A saxophone drawn in thin gold lines on a deep navy background.",
      resolution: "2K",
      aspect_ratio: "4:5",
    },
    max_cost_usd: 0.1,
  }),
});
if (!res.ok) throw new Error(`${res.status} ${await res.text()}`);
let job = await res.json();

while (job.status === "queued" || job.status === "running") {
  await new Promise((r) => setTimeout(r, 5000));
  job = await (await fetch(`${API}/generations/${job.id}`, { headers })).json();
}

if (job.status === "succeeded") console.log(job.output.urls, job.cost_usd);
else console.error("Failed:", job.error);

完成的生成任务会把图片链接放在 output.urls 中。请尽快下载:输出链接会过期。

响应
{
  "id": "gen_01JC3PZK8R",
  "model": "nano-banana-pro",
  "status": "succeeded",
  "output": {
    "urls": [
      "https://cdn.revana.si/g/gen_01JC3PZK8R/0.png"
    ]
  },
  "cost_usd": 0.04,
  "attempts": 1,
  "error": null,
  "created_at": "2026-10-19T14:02:11Z",
  "completed_at": "2026-10-19T14:02:29Z"
}

编辑一张图片

通过 image_url 传入要修改的图片,并描述编辑内容,包括哪些部分必须保持不变。

请求体
{
  "model": "nano-banana-pro",
  "input": {
    "prompt": "Change the season to winter: snow on the ground and the rooftops, a pale grey sky. Keep the house, the car and the composition exactly as they are.",
    "image_url": "https://example.com/house.jpg",
    "resolution": "2K",
    "aspect_ratio": "16:9"
  },
  "max_cost_usd": 0.1
}

组合多张图片

通过 image_urls 发送最多 14 张图片,并按位置引用每一张。这张 4K 产品图的费用为 $0.08。

请求体
{
  "model": "nano-banana-pro",
  "input": {
    "prompt": "Place the perfume bottle from the first image on the marble shelf from the second image, styled like the third image: soft window light, muted greens. Keep the label text on the bottle exactly as it is.",
    "image_urls": [
      "https://example.com/bottle.jpg",
      "https://example.com/shelf.jpg",
      "https://example.com/style.jpg"
    ],
    "resolution": "4K",
    "aspect_ratio": "1:1"
  },
  "max_cost_usd": 0.1
}

Nano Banana Pro 的提示词技巧

  • 引用确切的文字。把每一段文字放在引号里,并说明放在哪里:“顶部的标题”“右下角的小字”。
  • 描述字体。“粗体窄无衬线字体”“手写体”或“打字机字体”可以引导字样的外观。
  • 规划页面布局。对于海报和信息图,先从上到下描述结构,再描述风格。
  • 给输入图片编号。“第三张图里的徽标”没有歧义;而发送多张图片时,只说“徽标”就有歧义。
  • 说明要保留什么。编辑时,要像说明要改什么一样清楚地说明哪些内容不能变(人脸、标签、构图)。
  • 分步编辑。每次请求只改一处,比一次改五处更容易控制,某一步不理想,重做的成本也低。

路由与回退

目前 Nano Banana Pro 在 Revana 上有一条线路。当模型有多条线路时,路由器会先尝试最便宜的,失败后把任务转到下一条,始终按标价计费。只有一条线路时没有可回退的对象:如果它失败,任务会以 failed 结束,且不收费。

请在你的应用中处理 failed 的任务,例如稍后重试,或者提供第二个模型,比如有两条线路的 Nano Banana 2。

在模型页面查看所有图像模型,在文档中查看字段参考,或者获取 API 密钥并运行这些示例。

常见问题

Nano Banana Pro API 的价格是多少?

2026 年 10 月,Nano Banana Pro 在 1K 下每张 $0.04,2K 下 $0.04,4K 下 $0.08。100 张 2K 图片为 $4.00。

Nano Banana Pro 是什么?

它是 Google 对 Gemini 3 Pro Image 的叫法,这是一个于 2025 年 11 月发布的图像生成与编辑模型。它以图像内文字清晰可读以及能够组合多张输入图片而著称。

我可以向 Nano Banana Pro 发送多少张输入图片?

最多 14 张,通过 image_urls 传入。如果只编辑一张图片,请使用 image_url。

Nano Banana Pro 支持哪些宽高比?

目录中列出了 1:1、16:9、9:16、4:3、3:4、3:2、2:3、5:4、4:5 和 21:9。

Nano Banana Pro 和 Nano Banana 2 有什么区别?

Nano Banana 2 是 Gemini 3.1 Flash Image。在 Revana 上它列出 14 种宽高比,包括非常宽和非常高的画幅,每张 $0.03 起;Nano Banana Pro 列出 10 种,每张 $0.04 起。

图片失败时会扣费吗?

不会。提交时价格会被预留,任务失败时就会释放。你只需为已交付的图片付费。

用 Nano Banana Pro 生成

一个密钥即可使用 Nano Banana Pro、GPT Image 2 和所有视频模型。预付额度 $10 起,仅对已交付的图片收费。