When NanoBanana Generate-2 image generation tasks are completed, the system will send results to your provided callback URL via POST request
/api/v1/nanobanana/generate-2), you can set a callback address through the callBackUrl parameter. After the task is completed, the system will automatically push the results to your specified address.callBackUrl. The actual response structure in production looks like the following:{
"code": 200,
"msg": "success",
"data": {
"taskId": "31ce2c17b257492959d62279e6d01a54",
"paramJson": "{...}",
"completeTime": "2026-02-27 24:00:00",
"response": {
"originImageUrl": null,
"resultImageUrl": "https://tempfile.aiquickdraw.com/gemini-preview/xxxxxx.jpeg"
},
"successFlag": 1,
"errorCode": null,
"errorMessage": null,
"operationType": "nano-banana-2_1k",
"createTime": "2026-02-27 24:00:00"
}
}code · integer · requiredcode field indicating whether the callback request itself is successful.data.successFlag and data.errorCode.msg · string · required"success". For detailed failure reasons, refer to data.errorMessage.data.taskId · string · requiredtaskId returned when you submitted the task.data.successFlag · integer · required| Value | Description |
|---|---|
| 0 | GENERATING - Task is currently being processed |
| 1 | SUCCESS - Image generated successfully; you can read response.resultImageUrl for the result |
| 2 | CREATE_TASK_FAILED - Failed to create the task |
| 3 | GENERATE_FAILED - Generation failed (for example flagged as sensitive content) |
data.errorCode · integersuccessFlag ≠ 1, indicating the failure reason, for example:422: The input or output was flagged as sensitive content (see the sensitive content failure example above)data.errorMessage · stringdata.response.resultImageUrl · stringsuccessFlag = 1 and generation succeeds.data.paramJson · stringdata.operationType · string"nano-banana-2_1k".data.createTime · stringdata.completeTime · stringdata.info.resultImageUrl field properly to get the generated image URL