nano-banana-2
Submit an async nano-banana-2 (Gemini 3.1 Flash Image Preview) image generation task. Returns a task_id to poll via the status endpoint.
Authorization
BearerAuth
AuthorizationBearer <token>
使用 Bearer Token 认证。
格式: Authorization: Bearer sk-xxxxxx
In: header
Request Body
application/json
model*string
模型名。固定为 nano-banana-2
input*object
prompt*string
size?string
比例 1:1 / 16:9 / 9:16 / auto,或像素形态 1024x1024
image?string
单张参考图 URL
images?array<string>
多张参考图 URL;最多 14 张
Items
items <= 14metadata?object
模型专属参数。
resolution?string
输出分辨率
Value in
"0.5K" | "1K" | "2K" | "4K"n?integer
Range
1 <= value <= 4official_fallback?boolean
上游失败时是否回退到官方通道
google_search?boolean
启用 Google 文本检索增强(nano-banana-2 专属)
google_image_search?boolean
启用 Google 图片检索增强(nano-banana-2 专属)
model_params?object
完全透传到上游的额外字段
[key: string]?any
[key: string]?never
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://loading/api/generate/submit" \ -H "Content-Type: application/json" \ -d '{ "model": "nano-banana-2", "input": { "prompt": "A cute orange tabby kitten on a wooden table" } }'{
"code": 200,
"data": {
"task_id": "task_EPaZiCmMQOaDS2pdcwIEtFEV1aWjuWb2",
"status": "not_started",
"created_time": "2026-06-18T09:08:50",
"error_message": null
}
}{
"code": 400,
"error": {
"message": "input.prompt is required",
"type": "invalid_request_error"
}
}{
"code": 400,
"error": {
"message": "string",
"type": "invalid_request_error"
}
}{
"code": 400,
"error": {
"message": "string",
"type": "invalid_request_error"
}
}{
"code": 400,
"error": {
"message": "string",
"type": "invalid_request_error"
}
}{
"code": 400,
"error": {
"message": "string",
"type": "invalid_request_error"
}
}How is this guide?
Last updated on