Skip to main content
POST
  1. After submission, a task_id will be returned. If you provided a callback_url, when the task status becomes finished or failed, a POST request will be sent to the callback_url.
  2. Regardless of whether callback_url is provided, you can retrieve the response result through the unified Query Task Status endpoint.

Nano Banana 2 Lite Image Generation

Nano Banana 2 Lite is Google’s fastest and most cost-efficient Gemini Image model, corresponding to Gemini 3.1 Flash Lite Image. It is designed for rapid ideation, low-latency creative drafts, high-throughput generation, and scaled image pipelines where speed and cost matter most.

Available Models

  • nano-banana-2-lite - Text-to-image generation
  • nano-banana-2-lite-edit - Image editing with reference images

Input Parameters

  • prompt - Required. Text instruction for the generated or edited image.
  • image_urls - Required for nano-banana-2-lite-edit. Not supported for nano-banana-2-lite.
  • size - Optional aspect ratio. If omitted, no explicit output aspect ratio is specified.
Supported size values: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9.

Text-to-Image Example

Image Editing Example

Authorizations

Authorization
string
header
required

All API endpoints require Bearer Token authentication

Get your API Key:

Visit the API Key Management Page to get your API Key

Add it to the request header:

Body

application/json
model
enum<string>
required

Nano Banana 2 Lite model identifier

Available options:
nano-banana-2-lite,
nano-banana-2-lite-edit
input
object
required

Input parameters. image_urls is required for nano-banana-2-lite-edit and is not supported for nano-banana-2-lite.

callback_url
string<uri>

Webhook callback URL for result notifications

Example:

"https://your-domain.com/callback"

Response

Task submitted successfully

code
integer
required

HTTP status code

Example:

200

data
object
required