Skip to main content
POST
Nano Banana Text to Image
Generate images from text prompts using the Gemini 2.5 Flash model.

Request Headers

Content-Type
string
required
Enum: application/json
Authorization
string
required
Bearer authentication format: Bearer {{API Key}}.

Request Body

prompt
string
required
Text prompt describing the image to generate
aspect_ratio
string
Aspect ratio of the generated image. Available values: 1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9Possible values: 1:1, 3:2, 2:3, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9

Response

image_urls
array
required
List of generated image URLs