Nano Banana 2
Generate images using the Nano Banana 2 model (asynchronously), unifying text-to-image and image editing, with support for Google Search enhancement
- Unified Generation & Editing - Text-to-image and image editing in a single endpoint
- Google Search Enhancement - Generate imagery based on real-time data with Google Search integration
- Multi-Image Input - Support up to 14 input images for editing and reference
- Flexible Resolution - Support 1K, 2K, and 4K output resolutions
- Multiple Aspect Ratios - Wide range of aspect ratios from 1:1 to 21:9
Authorizations
Please use your API Token for authentication
Body
Task parameters
Prompt Text description for image generation (required, maximum 20000 characters)
1 - 20000"A beautiful landscape with mountains and a lake at sunset"
AspectRatio Image aspect ratio (optional, default is auto)
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 "auto"
GoogleSearch Whether to use Google Search enhancement (optional, default is false)
false
ImageInput List of input images (optional, supports up to 14 images, each up to 30MB)
14[""]OutputFormat Output image format (optional, default is jpg)
jpg, png "jpg"
Resolution Image resolution (optional, default is 1K)
1K, 2K, 4K "1K"
Response
OK
Task ID
"01234567-89ab-cdef-0123-456789abcdef"