Get started with the NanoBanana API in minutes. Learn how to generate and edit images using AI.
Get Your API Key
Add to Request Headers
taskId
to monitor progress:
0
: GENERATING - Task is currently being processed1
: SUCCESS - Task completed successfully2
: CREATE_TASK_FAILED - Failed to create the task3
: GENERATE_FAILED - Task creation succeeded but generation failedParameter | Type | Description |
---|---|---|
prompt | string | Text description for image generation |
type | string | Generation type: TEXTTOIAMGE or IMAGETOIAMGE |
callBackUrl | string | Webhook callback URL |
Parameter | Type | Description | Default |
---|---|---|---|
numImages | integer | Number of images to generate (1-4) | 1 |
imageUrls | array | Input image URLs for editing | - |
watermark | string | Watermark text for generated images | - |