mingyan
Nano Banana - Create Task
Create image generation tasks with support for multiple models and resolution options
Create Image Generation Task
Use the Nano Banana API to create high-quality AI image generation tasks with support for multiple models and resolution options.
Authentication
Get KeyAll requests require a Bearer token in the request header:
cURL
Authorization: Bearer {{key}}
Base URL
https://zcbservice.aizfw.cn/kyyReactApiServerbaseUrl is the shared prefix for all public APIs. The api field in the current page frontmatter shows the full endpoint. Use this baseUrl as the common prefix when reading or composing request paths.Request Parameters
modelstringrequiredModel name, available options:
nano-banananano-banana-pronano-banana-pro-stablenano-banana-2-stablenano-banana-2
promptstringrequiredImage generation prompt
Example:
"A cute orange cat sitting on a windowsill looking at the scenery outside"resolutionstringnano-banana、nano-banana-2、nano-banana-2-stable According to the restricted ability instructions, it is recommended to use 1KAvailable options:
1k- 1K resolution2k- 2K resolution4k- 4K resolution
sizestringAspect ratio setting
Available options:
1:1- Square16:9- Landscape widescreen9:16- Portrait4:3- Standard landscape3:4- Standard portrait3:2- Classic landscape2:3- Classic portrait5:4- Slightly wide landscape4:5- Slightly tall portrait21:9- Ultra-wide
image_urlsarrayArray of reference image URLs to guide image generation style, up to 6 images
Response Parameters
idstringUnique identifier for the image generation task, used for subsequent status queries
objectstringObject type, always
nanobananacreatedintegerTask creation timestamp
modelstringModel name used
statusstringTask status:
queued- Queuedprocessing- Processing
errorstringError message, returned when status is
failedModel Features
nano-banana-fast
Basic model, fast generation, suitable for general use
nano-banana-2
Enhanced model with resolution settings support, higher quality
nano-banana-pro
Professional model, highest quality, supports 4K resolution
Important Notes
Important:
- Image generation is asynchronous, use the returned
idto query task status and results resolutionparameter is only effective when usingnano-banana-2ornano-banana-promodels- Recommended polling interval is 2-5 seconds, avoid frequent requests
Best Practices:
- Use
application/jsonformat for requests - Prompts should clearly describe the desired image content and style
- Reference images can help guide generation style but are not required; up to 6 images are supported
- Choose appropriate aspect ratio to match your use case

