Skip to main content
POST
Nano Banana 2 Image Generation
Generate images using Google DeepMind’s Nano Banana 2 (Gemini 2.0 Flash) model. Key Features:
  • 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

Authorization
string
header
required

Please use your API Token for authentication

Body

application/json

Task parameters

prompt
string
required

Prompt Text description for image generation (required, maximum 20000 characters)

Required string length: 1 - 20000
Example:

"A beautiful landscape with mountains and a lake at sunset"

aspect_ratio
enum<string>
default:auto

AspectRatio Image aspect ratio (optional, default is auto)

Available options:
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
Example:

"auto"

GoogleSearch Whether to use Google Search enhancement (optional, default is false)

Example:

false

image_input
string[]

ImageInput List of input images (optional, supports up to 14 images, each up to 30MB)

Maximum array length: 14
Example:
output_format
enum<string>
default:jpg

OutputFormat Output image format (optional, default is jpg)

Available options:
jpg,
png
Example:

"jpg"

resolution
enum<string>
default:1K

Resolution Image resolution (optional, default is 1K)

Available options:
1K,
2K,
4K
Example:

"1K"

Response

OK

task_id
string
required

Task ID

Example:

"01234567-89ab-cdef-0123-456789abcdef"