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

Nano Banana 2.1 Image Generation

Use nano-banana-2.1 for text-to-image generation. Add image_urls to edit one or more reference images with the same model ID. The model supports up to 10 reference images.

Available Models

  • nano-banana-2.1 - Text-to-image and image-to-image generation
The default resolution is 1K. For text-to-image generation, size defaults to 1:1. When image_urls are provided, size defaults to auto, allowing the model to choose an aspect ratio from the reference images. You can also select a supported ratio explicitly. The auto option is only available for image editing.

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.1 model identifier

Available options:
nano-banana-2.1
input
object
required

Image generation or editing parameters.

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