Google 官方示例 · DeepMind
文字渲染与翻译
标题、标签和说明可以直接画进图里,也能把已有图片里的文字翻译成另一种语言,排版不变。
要出现的文字放在引号里写全,小字生成后检查一遍。套用后换成你自己的参考图。
提示词(原文)
Translate text to Spanish, keep the same text style.
Nano Banana 2 API 调用 Google 的 Gemini 3.1 Flash Image:文字出图,或传最多 9 张参考图改图;8 种画幅,1K / 2K / 4K,按张计费,参考图不另收费。
定价
1K 一张
结果链接为签名链接,保留 24 小时,需要保存请及时下载;失败的任务全额退款。
充值前先算清楚
Nano Banana 2 API 出一张图多少钱
按张计费,价格只看分辨率:文生图和改图同价,参考图不另收费。账户余额和扣费都按美元计;用支付宝付款时,按下单时的汇率折成人民币支付。
你的第一次测试
1K 一张
$0.0147$0.067/ 张
提交时冻结这一张的价格,出图后扣款;失败的任务全额退回余额。
常见花费
文字出图
1K · 文生图
$0.0147$0.067
最便宜的一档,先用它调提示词
改图 · 9 张参考图
1K · 图生图
$0.0147
参考图不另收费;官方另按输入 token 计
2K 成图
2K
$0.0157$0.101
社媒、详情页够用
4K 大图
4K
$0.0168$0.151
印刷、大屏
| 分辨率 | 1K | 2K | 4K |
|---|---|---|---|
| 每张 | $0.0147 | $0.0157 | $0.0168 |
划线为 Google Gemini API 官方每张约价,由官方按 token 计的价格折算。按成功出图的张数和分辨率计费,失败不扣费。
Nano Banana 2 是 Google 2026 年 2 月发布的 Gemini 3.1 Flash Image,定位是价格和速度兼顾、适合反复修改的图像模型。用 Nano Banana 2 API 可以做信息图、多语言海报、同一角色的系列图和电商改图。
每项配一张样图,标明是 APIKO 实测还是 Google 官方示例;字段和上限见下面的参数卡。
Google 官方示例 · DeepMind
标题、标签和说明可以直接画进图里,也能把已有图片里的文字翻译成另一种语言,排版不变。
要出现的文字放在引号里写全,小字生成后检查一遍。套用后换成你自己的参考图。
提示词(原文)
Translate text to Spanish, keep the same text style.
APIKO 实测 · 4K 改图 · 4096×4096 · C2PA:Google LLC
给参考图,写清要改什么、哪些不动。这张把傍晚街景改成雪夜,猫、店面和黑板上的「OPEN 24 HOURS」都保持原样。
在 APIKO 上一次最多传 9 张参考图;需要更多参考图(最多 14 张)用 Nano Banana 2.1。
提示词(原文)
Turn this scene into a snowy winter night. Keep the ginger cat, the storefront and the chalkboard text "OPEN 24 HOURS" unchanged.
Google 官方示例 · Google 博客
把数据、流程或笔记交给它,生成能直接发布的信息图;层级和版式写进提示词,结果更好用。
先列出要出现的每一项数据和标题,再说版式:分几栏、按什么顺序。
提示词(原文)
Triptych infographic comparing three types of clouds: Cumulus, Stratus, and Cirrus. Each panel shows the cloud type in a dramatic sky with a bold label. High-contrast comic style. AR: 16:9
Google 官方示例 · DeepMind
Google 介绍 Nano Banana 2 会更严格地按复杂请求出图。这张提示词要求三套配色轮流出现:紫底橙字、橙底绿字、绿底紫字,成图都对上了。
一条提示词只描述一张图;要改就基于上一张改图,比重写提示词更稳。
提示词(原文)
A candid photograph captures a vibrant row of freshly wheat-pasted posters adhered to a heavily textured, dark green urban wall in Downtown Los Angeles. The posters are for an "Indie Film Fest," with "DOWNTOWN LA" printed in smaller letters directly below. The bold design alternates across three distinct color palettes: one with an electric purple background and orange and white text, the next a blazing orange background with lime green and white text, and the third a lime green background with purple and white text, creating a pulsating visual rhythm down the line. The edges of the posters show minor wrinkles and the damp sheen of the paste. They are layered haphazardly over older, torn and faded posters in shades of grey, blue, and brown, whose ragged edges and fragments provide a textured history beneath the newer, bright ones. The surrounding wall is rough concrete with patches of peeling paint, graffiti tags in black and white, and some grime. The lighting is diffused daylight, illuminating the street scene. The image is taken from a slightly low angle, looking slightly down the length of the wall on a sidewalk, with blurred pedestrians and traffic in the background on a slightly hazy day. The photo has a slightly grainy texture.
ARENA LEADERBOARD
在 Arena 截至 2026 年 9 月下旬的榜单中,Nano Banana 2(榜单上为启用网页搜索的 gemini-3.1-flash-image 配置)在多图参考编辑排名第 6,文字生成图片第 9,单张图片编辑第 12。
| 排名 / 模型 | 得分 |
|---|---|
| 1gpt-image-2.5-sunburst | 1424 |
| 2gpt-image-2.5-flare | 1401 |
| 3gpt-image-2 (medium) | 1383 |
| 9gemini-3.1-flash-image (nano-banana-2) [web-search] | 1261 |
| 排名 / 模型 | 得分 |
|---|---|
| 1gpt-image-2.5-sunburst | 1526 |
| 2gpt-image-2.5-flare | 1482 |
| 3gpt-image-2 (medium) | 1461 |
| 12gemini-3.1-flash-image (nano-banana-2) [web-search] | 1388 |
| 排名 / 模型 | 得分 |
|---|---|
| 1gpt-image-2.5-sunburst | 1527 |
| 2gpt-image-2.5-flare | 1478 |
| 3gpt-image-2 (medium) | 1453 |
| 6gemini-3.1-flash-image (nano-banana-2) [web-search] | 1369 |
翻译图中文字,为不同市场准备同一套视觉。
把数据、流程或笔记转成可以直接发布的图示。
用参考图固定角色形象,连续生成同一系列的画面。
在应用中提供快速出图和修改,让用户多轮调整。
下面是 nano-banana-2 请求体里的全部字段,默认值取自 API。
modelstring模型 ID,固定为 nano-banana-2。
默认值:必填
promptstring画面描述;要出现的文字放在引号里写全。
默认值:必填
sizeenum画面比例:1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 21:9。改图不传时沿用参考图的比例。
默认值:1:1
resolutionenum1k, 2k, 4k,按档位计费。
默认值:1k
imagesarray参考图的公网 HTTPS 链接,1–9 张;POST /v1/images/edits 必填。
默认值:不传
ninteger每次 1 张。
默认值:1
asyncbooleantrue 时立即返回任务 ID,用 GET /v1/tasks/{id} 查结果。
默认值:false
response_formatenumurl(签名链接,保留 24 小时)或 b64_json。
默认值:url
callback_urlstring任务完成后通知这个 HTTPS 地址;不传就自己轮询任务状态。
默认值:不传
输入你的想法,按需添加参考图,三步完成创作。
先写主体、环境和画面目标,再补充材质、光线、镜头与需要出现的文字。
从文字生成图片,或填入参考图地址进行编辑。选择画幅与分辨率,每次运行生成一张图片。
在线体验确认效果后,用同一提示词和模型 ID 创建异步任务。
两种接法共用同一个 API Key 和余额:在自己的代码里直接调 API,或者让 Claude Code、Codex 通过 APIKO MCP 替你调。
方式一 · 在代码里调用 API
适合:产品后端、批量任务、自动化流程
请求鉴权
在控制台创建 API Key,存进环境变量 APIKO_API_KEY,每次请求都在请求头带上 Authorization: Bearer <key>。
提交 nano-banana-2 任务
向 POST /v1/images/generations 发送模型 ID、提示词和 async: true,立即拿到任务 ID。
查询生成结果
轮询 GET /v1/tasks/{id},直到状态变成 completed,读取 data[0].url。结果链接 24 小时后过期,请及时下载。
TASK_ID=$(curl https://api.apiko.app/v1/images/generations \
-H "Authorization: Bearer $APIKO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "nano-banana-2",
"prompt": "A hand-drawn city food map infographic: five snack shops marked with their signature dishes, the title \"Old Town Food Trail\", bright illustrated palette.",
"size": "1:1",
"resolution": "1k",
"async": true
}' | python3 -c 'import json,sys; print(json.load(sys.stdin)["id"])')
while :; do
TASK=$(curl -s https://api.apiko.app/v1/tasks/$TASK_ID \
-H "Authorization: Bearer $APIKO_API_KEY")
printf '%s\n' "$TASK"
printf '%s' "$TASK" | grep -qE '"status": *"(completed|failed)"|"error": *\{' && break
sleep 5
done方式二 · 在 Claude Code 或 Codex 里调用
适合:快速出片、试提示词、让 Agent 帮你把接入写好
装上 APIKO MCP
Key 放在环境变量里,不要贴进对话。
告诉 Agent 要什么
画面、画幅、清晰度和画质,再给一个预算上限。
Agent 报价、提交、跟进
先 estimate_cost 报价,再 generate_image 提交,把图片链接给你。
# Claude Code
claude mcp add apiko --scope user -e APIKO_API_KEY=sk-... -- npx -y apiko-mcp
# Codex
codex mcp add apiko --env APIKO_API_KEY=sk-... -- npx -y apiko-mcp
Agent 提示词
用 APIKO 的 nano-banana-2 生成一张图:1K、1:1。提示词:<在这里写画面>。先用 estimate_cost 报价,超过 $1 先问我;确认后用 generate_image 提交,把图片链接发给我;失败就告诉我原因。
在本页在线体验调好提示词、比例和分辨率,再通过 APIKO API 用同一个模型 ID 批量生成。
探索 APIKO 上的 Google 图像与文本模型,为不同任务选择合适的能力。
Nano Banana 2 是 Google Gemini 3.1 Flash Image 的名称,属于 Gemini Flash 系列的图像模型。
Nano Banana 2 更看重速度和迭代,Nano Banana Pro 面向更复杂的生成与编辑、画质更高。两者在 APIKO 上参数范围相同。
在 APIKO 上编辑时最多 9 张,每张为公网 HTTPS 链接。
1:1、16:9、9:16、4:3、3:4、3:2、2:3 和 21:9。编辑时不传 size 会沿用参考图的比例。
可以。Google 介绍 Nano Banana 2 的文字渲染更可靠,还能翻译和本地化图中文字;较长或较小的文字建议生成后检查。
Nano Banana 2 不支持:它在 APIKO 的接口中没有搜索相关参数,模型根据提示词和参考图生成。Nano Banana 2.1 支持 web_search 和 image_search。Arena 榜单中的 Nano Banana 2 是启用网页搜索的配置,表现可能与此不同。
resolution 可选 1K、2K、4K,默认 1K,价格按档位递增。草稿阶段用 1K,定稿再换高档位。
Google 表示其工具生成的媒体都会嵌入不可见的 SynthID 数字水印。
每次成功调用按公布的单次费率或所选档位计费。失败请求的退款规则见下方问题。
兼容。使用网关 base URL 与 API Key,并按模型选择图片或视频端点及上方字段。
注册后在控制台创建 API Key。一个 API Key 可以调用网关上的所有模型。
可以。用 Gmail 账号通过 Google 登录,余额自动到账 0.20 美元试用额度,无需绑定信用卡,每人限一次。nano-banana-2 和其他所有模型都能用。
图片为异步任务:提交请求,轮询 GET /v1/tasks/<id>,完成后读取 data[0].url。视频轮询 GET /v1/videos/<id>,完成后下载 video_url。APIKO 签名链接保留 24 小时。
失败或报错的调用不计费。可以重试;若持续失败,请点页面右下角的在线客服联系我们。
本页更新于