Nano Banana Pro
Generate or edit images from text and up to eight public HTTPS reference images, with output up to 4K.
### Supported modes
| Mode | Required input | Rules |
| --- | --- | --- |
| Text to image | `model`, `prompt` | Omit `images`. |
| Reference image | `model`, `prompt`, `images` | Provide 1–8 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`.
Authentication
AuthorizationBearer
Send your API key as Authorization: Bearer <BEATAPI_API_KEY>.
Headers
Idempotency-Key
Request
This endpoint expects an object.
model
Must be nano-banana-pro.
prompt
Generation or image-editing instructions.
images
Public HTTPS reference-image URLs. Omit for text-to-image.
aspect_ratio
Output image aspect ratio.
resolution
Output resolution tier.
output_format
Output image file format.
Response
Image generation task accepted
Errors
400
Bad Request Error
401
Unauthorized Error
402
Payment Required Error
409
Conflict Error
429
Too Many Requests Error

