Skip to main content
← Nano Banana Model name: nano-banana-2.1/edit
Generation type: image_to_image
Endpoint: POST /api/asset_generator/

Pricing

Prices are per output. When a request asks for several outputs, the charge is this price times the number of outputs.

Quick start

The example uses sample media from our CDN. Swap in publicly accessible URLs for your own files.

Input parameters

Send these fields in input_params.
string
required
The prompt for image editing.Minimum characters: 3. Maximum characters: 5000.
string[]
required
The URLs of the images to use for image editing.Minimum items: 1. Maximum items: 7.
integer
default:1
The number of images to generate.Minimum: 1. Maximum: 4.
string
default:"1K"
The resolution of the image to generate.Allowed values: "1K", "2K", "4K".
string
default:"9:16"
The aspect ratio of the generated image.Allowed values: "21:9", "16:9", "3:2", "4:3", "5:4", "1:1", "4:5", "3:4", "2:3", "9:16".
string
default:"png"
The format of the generated image.Allowed values: "jpeg", "png", "webp".

Response

The request returns the task with status: "initializing". Poll GET /api/asset_generator/{id}/ until status is done or failed, or pass a webhook_url to be notified. A finished task lists its files in assets and the credits it charged in credits_used.