callBackUrl is provided, task completion notifications will be sent to that URL via POST requestprompt field supports up to 20,000 characters; more detailed prompts generally produce better resultsimageUrls is an empty array, the request runs in pure text-to-image mode; when URLs are provided, it runs in image-to-image / reference modeaspectRatio, resolution, and outputFormatcurl --location 'https://api.nanobananaapi.ai/api/v1/nanobanana/generate-2' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"prompt": "a happy dog running in the park",
"imageUrls": [],
"aspectRatio": "auto",
"resolution": "1K",
"googleSearch": false,
"outputFormat": "jpg",
"callBackUrl": "https://example-callback.com"
}'{
"code": 200,
"message": "success",
"data": {
"taskId": "task_12345678"
}
}