图像与视频
gemini-nano-banana-2.1
Model ID:gemini-nano-banana-2.1
| Context window | — |
|---|---|
| Billing method | Per Use (CNY / Use) |
| Unit Price (CNY / Time) | 1K ¥0.25 / 2K ¥0.35 / 4K ¥0.5 |
| Multiplier | 1.00x |
Prices by channel
| Channel | Unit Price (CNY / Time) | Multiplier |
|---|---|---|
| bananarouter-banana | ¥0.25 | 1.00x |
| bananarouter-banana | ¥0.35 | 1.00x |
| bananarouter-banana | ¥0.5 | 1.00x |
Call example
This model belongs to the图像与视频group, calling protocol:网关媒体生成接口(图片按次、视频按秒计费)Enter your API Key to use; groups determine the entry point and cannot be mixed (e.g., models in the Gemini group cannot use /v1/messages).
Request examplecurl
curl https://www.relay-api.com/v1/images/generations \
-H "Authorization: Bearer sk-你的Key" \
-H "content-type: application/json" \
-d '{
"model": "gemini-nano-banana-2.1",
"prompt": "一只在草地上奔跑的柯基,清晨逆光",
"n": 1,
"size": "1024x1024"
}'
# 图生图 / 改图:参考图走 base64(data URL 或裸 base64 都收,最多 4 张)
# curl https://www.relay-api.com/v1/images/generations \
# -H "Authorization: Bearer sk-你的Key" \
# -H "content-type: application/json" \
# -d '{"model":"gemini-nano-banana-2.1","prompt":"把背景换成雪景","image":["data:image/png;base64,<BASE64>"]}'响应:网关把上游原始 JSON 透传回来(sk- 密钥不加包装;浏览器会话加 {code,data} 包装)——图片为 images 响应(url / b64_json),视频为 generateContent 响应。
