Claude Opus 5.5 已在 SeedRouter 上线

Nano Banana Pro 提示词指南:结构、文字、参考图与编辑

如何写 Nano Banana Pro 提示词:五要素结构、让图中文字准确、给参考图分配角色、只改需要改的部分,以及输出 2K 或 4K 图片。

以 Markdown 阅读

好的 Nano Banana Pro 提示词用完整的句子描述画面:画面里是谁或什么、镜头怎么取景、正在发生什么、场景在哪里、整体是什么风格。把需要渲染的文字原样放进双引号,说明每张参考图的用途;如果是编辑,既要说清楚要改什么,也要说清楚哪些必须保持不变。尺寸和宽高比通过请求参数设置,不写在提示词里。下文的建议来自 Google 自己的 Nano Banana Pro 文档和提示词技巧(核对于 2026 年 9 月 29 日),以及 SeedRouter API 的规则。

怎么写 Nano Banana Pro 提示词?

Google 的 Nano Banana Pro 提示词技巧列出了五个要写进去的要素:

  1. 主体。 “画面里是谁或什么?要具体。”
  2. 构图。 “镜头怎么取景?”例如特写、广角或低角度。
  3. 动作。 “正在发生什么?”
  4. 地点。 “场景发生在哪里?”
  5. 风格。 “整体美学是什么?”例如写实照片、水彩或 3D 动画。

把这些写成句子,而不是一串关键词。Nano Banana Pro 是一个会思考的模型:它在作画前会先推敲提示词,所以清晰的描述比一串标签给它的信息更多。Google 的图像生成指南也是这么说的:“你描述得越具体,对结果的控制就越多。”

Google 最佳实践里还有两个习惯,几乎对每个提示词都有帮助:

  • 说明用途。 “为一个高端、极简的护肤品牌设计 logo”比“设计一个 logo”效果更好,因为模型会利用这些上下文。
  • 描述你想要的,而不是你不想要的。 Google 把这叫作“语义化的负面提示”:不要写“没有汽车”,而是写“一条空荡荡、看不到任何车流的街道”。

下面是一个按五要素写成的提示词:

A close-up photograph of a hand-thrown ceramic bowl filled with ripe cherries, resting on a weathered wooden table in a sunlit farmhouse kitchen. Morning light comes from a window on the left and casts soft shadows to the right. Shallow depth of field, warm and natural colors, editorial food photography.

怎么让 Nano Banana Pro 图片里的文字准确?

文字渲染是 Nano Banana Pro 的强项之一。Google 称它是“在图片中直接生成正确渲染、清晰可读文字的最佳模型”。要让文字准确:

  • 把要出现的文字原样放进双引号,并说明放在哪里。Google 的例子:“标题 'URBAN EXPLORER' 以粗体、白色、无衬线字体显示在顶部。”
  • 用文字描述字体,例如粗衬线、手写体或窄体无衬线。
  • 先把文案定下来。 Google 的指南指出,模型“最好先生成文字,再要求生成带这些文字的图片”。在写提示词之前先确定准确的文案,不要让模型同时写文案又做设计。
  • 检查小字。 Google 把“渲染小字、细节以及准确拼写”列为可能还不完美的方面。关键文字要做大,每次出图都要校对。
A minimalist concert poster in a 2:3 vertical layout. The headline "MIDNIGHT ORCHESTRA" sits at the top in tall, condensed, cream-colored serif letters. Below it, a single violin floats against a deep navy background lit by a soft spotlight. At the bottom, the line "Live at the Harbor Hall, October 18" appears in small, clean sans-serif text. No other text.

Nano Banana Pro 还能写其他语言的文字,也能翻译图片中已有的文字。Google 提醒,多语言文字“可能出现语法错误或遗漏特定的文化细节”,所以请让母语者检查。

怎么在 Nano Banana Pro 提示词中使用参考图?

一个请求最多可以带 14 张参考图。Google 的文档对 Nano Banana Pro 的上限是这样划分的:最多 6 张物体图(高保真保留),最多 5 张人物图(保持角色一致),最多 3 张用作风格参考的图。

提示词要说明每张图的用途。Google 的建议是:“使用上传的图片时,要明确每张图的角色。(例如:‘用图 A 作为人物姿势,用图 B 作为画风,用图 C 作为背景环境。’)”按你附加图片的顺序来指代它们。

在 SeedRouter 上,参考图以公开图片 URL 的形式放在 fileData 部分中传入,不接受 base64 和文件上传。带两张参考图的请求如下:

{
  "model": "gemini-3-pro-image",
  "contents": [{
    "role": "user",
    "parts": [
      {"text": "Place the lamp from the first image on the desk in the second image. Keep the lamp's shape, color and materials exactly as they are. Match the warm evening light of the second image."},
      {"fileData": {"mimeType": "image/jpeg", "fileUri": "https://example.com/lamp.jpg"}},
      {"fileData": {"mimeType": "image/png", "fileUri": "https://example.com/desk.png"}}
    ]
  }],
  "generationConfig": {
    "responseModalities": ["IMAGE"],
    "imageConfig": {"aspectRatio": "4:3", "imageSize": "2K"}
  }
}

请求发送到 POST /v1/images/generations,返回一个任务 ID;Nano Banana 2 API 教程完整演示了提交和轮询的过程,Nano Banana Pro 的步骤完全相同。

怎么用 Nano Banana Pro 提示词编辑图片?

附上图片,直接描述要做的修改。Google 对编辑的建议是:“直接、具体。(例如:把那个男人的领带改成绿色,去掉背景里的车)”。

如果只改图片的一部分,Google 的指南把这种技巧叫作语义遮罩:用文字划定区域,而不是画遮罩。它给出的模板是:“只把[具体元素]改成[新元素/描述]。图片中其他一切都保持完全不变,保留原有的风格、光线和构图。”

Using the provided photo of a reading nook, change only the gray armchair to a dark green velvet armchair with brass legs. Keep everything else exactly the same, including the bookshelf, the rug, the window and the lighting.

其他按同样思路写的编辑示例:

Transform the provided photo of a harbor at dusk into a flat vector illustration with bold outlines and a limited palette of teal, orange and cream. Keep the composition of the boats and buildings.
Turn this rough pencil sketch of a desk lamp into a polished product photo of the finished lamp on a white studio background. Keep the angled arm and round base from the sketch, and make the shade brushed aluminum.

如果要在多轮对话中持续修改同一张图,每次新请求都要把之前的轮次一起发回去。Nano Banana Pro API 参考说明了如何根据已完成的任务重建模型那一轮。

怎么从 Nano Banana Pro 得到 2K 和 4K 图片?

尺寸在请求里设置,而不是写在提示词里。generationConfig.imageConfig.imageSize 可选 1K(默认)、2K 或 4K,K 必须大写。aspectRatio 可选十种比例:1:1、2:3、3:2、3:4、4:3、4:5、5:4、9:16、16:9 和 21:9。不设比例时,输出跟随输入图片的比例;没有输入图片时则为正方形。

"generationConfig": {
  "responseModalities": ["IMAGE"],
  "imageConfig": {"aspectRatio": "16:9", "imageSize": "4K"}
}

在 16:9 下,三档尺寸分别输出 1376×768、2752×1536 和 5504×3072。图片要打印或要大幅裁切时用 4K;用于屏幕显示时,2K 通常就够了。输出尺寸由 imageSize 决定:不设置就是 1K,提示词里怎么写都一样。尺寸如何影响费用,见 Nano Banana API 价格。

一条 Nano Banana Pro 提示词能生成多张图片吗?

一个请求只返回一张图片:candidateCount 只接受 1。在提示词里要求“四个版本”并不会多出图片,Google 的指南也指出,模型“不一定会严格按照用户明确要求的图片数量输出”。

有两种办法:

  • 每张图发一个请求。 每次请求之间只改一个细节,方便对比不同版本。
  • 在一张图里要求多个设计。 例如“四个图标变体,在白色背景上排成 2×2 网格”,得到的是一张同时展示四个设计的图片。
Four app icon variations for a weather app, arranged in a 2x2 grid on a plain white background. Each icon is a rounded square with a soft gradient: a sun, a cloud, a raindrop and a snowflake. Flat, clean vector style with gentle shadows. No text.

Nano Banana Pro 提示词最长能写多长?

Google 标注该模型的输入上限是 65,536 个 token,文字和参考图一起计算。大多数提示词只需要几句话。增加长度有用的前提是它带来了具体细节;用不同的话重复同一个指令并没有帮助。

对于复杂的场景,Google 建议用分步指令代替一个长句:“首先,创建一个黎明时分宁静、薄雾笼罩的森林背景。然后,在前景中加入一座长满青苔的古老石祭坛。最后,在祭坛上放一把发光的剑。”

更多 Nano Banana Pro 提示词示例

下面每个示例都遵循上面的结构。换掉主体,其余部分保留即可。

产品图

A studio product photograph of a matte white wireless speaker on a pale sage-green surface. Soft, diffused light from a large softbox above, with a subtle shadow beneath the speaker. Slightly elevated three-quarter view that shows the fabric grille. Sharp focus, clean background, square format.

贴纸

A cute sticker of a small orange fox wearing a knitted scarf, curled up asleep on a stack of books. Thick white border, bold clean outlines, simple cel shading and bright colors. The background is plain white.

信息图

A clean infographic titled "How to Brew Pour-Over Coffee" in five numbered steps, arranged from top to bottom: heat the water, rinse the filter, add ground coffee, pour in slow circles, serve. Each step has a simple line icon and a short label. Flat design, warm brown and cream palette, generous white space.

等距场景

A 45-degree isometric miniature of a small seaside town with a lighthouse, a harbor with fishing boats and a row of pastel houses. Soft, realistic materials and gentle afternoon light. Clean composition on a solid pale-blue background.

分镜

A four-panel storyboard in black-and-white pencil sketch style for a short scene: an establishing shot of a mountain cabin in snow, a medium shot of a hiker opening the door, a close-up of a kettle on a stove, and a wide shot of the cabin window glowing at night.

Nano Banana Pro 还有哪些做得不好的地方?

Google 列出了以下仍需改进的方面:

  • 小字、细节和准确拼写;
  • 图表、信息图这类数据驱动的视觉内容的事实准确性,Google 建议一律核实;
  • 多语言文字的语法和文化细节;
  • 融合、改光线等高级编辑的自然度;
  • 多次编辑之间的角色一致性,“可能会有变化”。

凡是要发布的内容,都要安排一个审核步骤。

常见问题

在 SeedRouter 上,Nano Banana Pro 提示词能用 Google 搜索吗?

不能。Google 搜索接地是通过 tools 发送的,SeedRouter 目前对该模型还不接受这个字段。请把需要的事实直接写进提示词。

Nano Banana Pro 提示词必须用英文吗?

不必。Google 列出的效果最好的语言除英语外,还包括日语、韩语、德语、西班牙语、法语、葡萄牙语、俄语、越南语和中文等。

能看到 Nano Banana Pro 是怎么理解我的提示词的吗?

能。把 generationConfig.thinkingConfig.includeThoughts 设为 true,已完成的任务会在 output.thoughts 中返回模型的思考摘要。读一读它,能帮你了解模型是怎么理解提示词的。

这些提示词该用哪个 Nano Banana 模型?

同样的提示词在 Nano Banana 2 和 Nano Banana Pro 上都能用。Nano Banana 2 vs Pro vs 2 Lite 说明了什么时候值得用 Pro。

在 Nano Banana Pro 上试一个提示词

写代码之前,可以先在 Nano Banana Pro playground 里测试提示词。每次请求都和 API 调用一样计费,失败的请求不收费。API 参考列出了全部参数。

相关指南