Nano Banana 2 Lite

Generate or edit 1K images from text and up to ten public HTTPS reference images at the lowest-priced Nano Banana 2 tier. ### Supported modes | Mode | Required input | Rules | | --- | --- | --- | | Text to image | `model`, `prompt` | Omit `images`. | | Reference image | `model`, `prompt`, `images` | Provide 1–10 public HTTPS image URLs. | **Async flow:** Create the task, save `data.id`, then [poll the Task](/quick-guide#get-task-status) with `GET /v1/tasks/{task_id}`. On `succeeded`, read `data.output.media`. On `failed`, read `data.error_code` and `data.error_message`, then follow the [error and retry policy](/quick-guide#errors-and-retry-policy). **Using a local file?** [upload a local input](/quick-guide#upload-an-input-file) first and pass the returned `data.url`.

身份验证

AuthorizationBearer

Send your API key as Authorization: Bearer <BEATAPI_API_KEY>.

请求头

Idempotency-Keystring可选<=255 characters

请求

This endpoint expects an object.
model"nano-banana-2-lite"必需

Must be nano-banana-2-lite.

promptstring必需1-5000 characters

Generation or image-editing instructions.

imageslist of strings可选

Public HTTPS reference-image URLs. Omit for text-to-image.

aspect_ratioenum可选默认为 1:1
Output image aspect ratio.
output_formatenum可选默认为 png
Output image file format.

响应

Image generation task accepted

错误

400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
409
Conflict Error
429
Too Many Requests Error