GeminiNano Banana Pro Preview
Nano Banana Pro Preview · 编辑图片
图片 / Gemini / Nano Banana Pro Preview / 编辑图片
POST
/v1/images/edits请求参数
Authorization
在 Header 添加参数 Authorization,其值为 Bearer 之后拼接你的 API Key。
Authorization: Bearer ****************
Body 参数multipart/form-data必填
modelstring必需
模型 ID,固定为 `gemini-3-pro-image-preview`
promptstring必需
编辑指令,如把背景改成雪夜
imagefile必需
待编辑图片;可重复传多张(`image` 或 `image[]`)
maskfile可选
蒙版图片,标出要修改的区域
ninteger可选
生成张数,默认 `1`
sizestring可选
分辨率,如 `1024x1024`
response_formatstring可选
返回格式。`url` 仅对支持的模型(如 DALL-E 系列)生效;OpenAI gpt-image 始终返 `b64_json` 并忽略此字段。
示例
{ "model": "gemini-3-pro-image-preview", "prompt": "把背景改成雪夜", "image": "dog.png", "size": "1024x1024"}请求示例代码
curl https://api.beerouter.ai/v1/images/edits \ -H "Authorization: Bearer $API_KEY" \ -F "model=gemini-3-pro-image-preview" \ -F "prompt=把背景改成雪夜" \ -F "image=@dog.png" \ -F "size=1024x1024"返回响应
200 · 成功
createdinteger可选
创建时间戳(秒)
dataarray[object]必需
生成的图片列表
示例
{ "created": 1730000000, "data": [ { "b64_json": "<base64>" } ]}
