Submit NanoBanana Generate-2 image generation task using the latest NanoBanana model.
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 outputFormatAll APIs require authentication via Bearer Token.
Get API Key:
Usage: Add to request header: Authorization: Bearer YOUR_API_KEY
Note:
Text prompt for image generation (required). Controls the content and style of the generated image. Maximum length: 20,000 characters.
20000["a happy dog running in the park"]Image URLs for image-to-image mode. Use an empty array for pure text-to-image generation. Supports up to 14 reference images.
14Aspect ratio of the generated image.
1:1, 1:4, 1:8, 2:3, 3:2, 3:4, 4:1, 4:3, 4:5, 5:4, 8:1, 9:16, 16:9, 21:9, auto Output resolution quality. Higher values produce larger and sharper images at higher cost.
1K, 2K, 4K Use Google Web Search grounding to generate images based on real-time information.
Output image format.
png, jpg Optional callback URL for async notifications when the task is completed.