Nano Banana Pro
Query Result
Nano Banana Pro async task result query endpoint
Queries the status and result of a Nano Banana Pro async generation task by task ID. After submitting an image generation task, poll this endpoint with the returned task_id until the task finishes.
Task status
queued/in_progress: running;progressholds the progress — retry later;completed: done; thedataarray contains the final image (Base64 inb64_json);failed: failed;errorexplains why.
Getting the image
Images are returned as b64_json Base64 strings (no url field is provided); decode and store them yourself.
Authorization
BearerAuth
AuthorizationBearer <token>
使用 Bearer Token 认证。
格式: Authorization: Bearer sk-xxxxxx
只能查询当前令牌所属账号下的任务。
In: header
Path Parameters
task_id*string
提交图片生成任务时返回的任务 ID(id / task_id)
Response Body
application/json
application/json
curl -X GET "https://www.omwai.xyz/v1/images/async/generations/task_01J8ABCDEFGHIJKLMNOPQRST"{
"id": "task_01J8ABCDEFGHIJKLMNOPQRST",
"task_id": "task_01J8ABCDEFGHIJKLMNOPQRST",
"object": "image.task",
"model": "nano-banana-pro",
"status": "completed",
"progress": "100%",
"created_at": 1788256630,
"completed_at": 1788256720,
"error": {
"code": "string",
"message": "string"
},
"data": [
{
"b64_json": "string",
"revised_prompt": "string"
}
]
}{
"code": "task_not_exist",
"message": "string"
}Note
Only tasks belonging to the current token's account can be queried. A missing or inaccessible task returns 400.
How is this guide?
Last updated on