Generate images from text and optional reference images using NanoBanana 2 model.
Image Generation — NanoBanana 2 (supports text + optional reference images)
| Resolution | Credits | Price |
|---|---|---|
| 1k | 15 | $0.075 |
| 2k | 15 | $0.075 |
| 4k | 25 | $0.125 |
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | nanobanana2 |
| inputs | object | Yes | Generation parameters |
| Parameter | Type | Required | Description |
|---|---|---|---|
| prompt | string | Yes | Image description |
| imageUrls | array | No | Reference image URLs for style/content guidance |
| negativePrompt | string | No | What to exclude from the image |
| aspectRatio | string | No | 1:1 / 3:4 (default) / 4:3 / 16:9 / 9:16 |
| resolution | string | No | 1k / 2k (default) / 4k |
| seed | number | No | Random seed for reproducibility |
| Status | Description |
|---|---|
waiting | Task queued, waiting to start |
generating | Image is being generated |
success | Generation completed, output available |
fail | Generation failed, check error field |
| HTTP Status | Description |
|---|---|
| 200 | Success |
| 400 | Invalid parameters |
| 401 | Authentication failed |
| 402 | Insufficient credits |
| 404 | Task not found |
| 429 | Rate limit / concurrency limit exceeded |
| 500 | Server error |