On this page
article
Nano Banana (openai 协议)
1.概述
google推出的文生图/图生图模型。
模型列表:
gemini-2.5-flash-image(Nano-Banana)gemini-3-pro-image-preview(Nano-Banana-Pro)gemini-3.1-flash-image-preview(Nano-Banana-2)
本模型为多模态模型,描述需要明确包含绘制的画面或明确要求绘图,简单字词可能无图片输出。
2.请求说明
- 请求方法:
POST - 请求地址
https://gateway.theturbo.ai/v1/images/generations
3.请求参数
3.1 Header参数
| 参数名称 | 类型 | 必填 | 说明 | 示例值 |
|---|---|---|---|---|
Content-Type |
string | 是 | 设置请求头类型,必须为application/json |
application/json |
Accept |
string | 是 | 设置响应类型,建议统一为application/json |
application/json |
Authorization |
string | 是 | 身份验证所需的 API_KEY,格式Bearer $YOUR_API_KEY |
Bearer $YOUR_API_KEY |
3.2 Body 参数 (application/json)
| 参数名称 | 类型 | 必填 | 说明 | 示例(默认值) |
|---|---|---|---|---|
| model | string | 是 | 要使用的模型 ID。详见列出的可用版本,如 gemini-2.5-flash-image。 |
gemini-2.5-flash-image |
| prompt | string | 是 | 一段描述所需图像的文字。 | A cute baby sea otter |
| aspect_ratio | string | 否 | 要生成的图片的宽高比。支持的宽高比:1:1、2:3、3:2、3:4、4:3、4:5、5:4、9:16、16:9 或 21:9。 | |
| image_size | string | 否 | 指定生成的图片的大小,支持的值为 1K、2K、4K | 1K |