Submit Nanobanana image generation or editing task using the NanoBanana AI model.
prompt and set type to “TEXTTOIAMGE”prompt, imageUrls and set type to “IMAGETOIAMGE”numImages parameterimage_size parameter to specify the desired aspect ratio for your imagescallBackUrl) is required for receiving task completion notificationsAll APIs require authentication via Bearer Token.
Get API Key:
Usage: Add to request header: Authorization: Bearer YOUR_API_KEY
Note:
Text prompt describing the desired image or edit.
"A serene mountain landscape at sunset with a lake reflecting the orange sky"
Generation type:
IMAGETOIAMGE, TEXTTOIAMGE "TEXTTOIAMGE"
Callback URL to receive task completion notifications (required)
"https://your-callback-url.com/callback"
Number of images to generate. Min: 1, Max: 4
1 <= x <= 41
Array of input image URLs for image editing mode
["https://example.com/input-image.jpg"]Watermark text to add to generated images
"NanoBanana"
Image aspect ratio. Supported ratios:
1:1, 9:16, 16:9, 3:4, 4:3, 3:2, 2:3, 5:4, 4:5, 21:9 "1:1"