mingyan

Nano Banana - Create Task

Create image generation tasks with support for multiple models and resolution options

POST/kyyReactApiServer/v1/banana/images

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 Key
All requests require a Bearer token in the request header:
cURL
Authorization: Bearer {{key}}

Base URL

https://zcbservice.aizfw.cn/kyyReactApiServer
baseUrl 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

modelstringrequired
Model name, available options:
  • nano-banana
  • nano-banana-pro
  • nano-banana-pro-stable
  • nano-banana-2-stable
  • nano-banana-2
promptstringrequired
Image generation prompt
Example: "A cute orange cat sitting on a windowsill looking at the scenery outside"
resolutionstring
nano-banananano-banana-2nano-banana-2-stable According to the restricted ability instructions, it is recommended to use 1K
Available options:
  • 1k - 1K resolution
  • 2k - 2K resolution
  • 4k - 4K resolution
sizestring
Aspect ratio setting
Available options:
  • 1:1 - Square
  • 16:9 - Landscape widescreen
  • 9:16 - Portrait
  • 4:3 - Standard landscape
  • 3:4 - Standard portrait
  • 3:2 - Classic landscape
  • 2:3 - Classic portrait
  • 5:4 - Slightly wide landscape
  • 4:5 - Slightly tall portrait
  • 21:9 - Ultra-wide
image_urlsarray
Array of reference image URLs to guide image generation style, up to 6 images

Response Parameters

idstring
Unique identifier for the image generation task, used for subsequent status queries
objectstring
Object type, always nanobanana
createdinteger
Task creation timestamp
modelstring
Model name used
statusstring
Task status:
  • queued - Queued
  • processing - Processing
errorstring
Error message, returned when status is failed

Model 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 id to query task status and results
  • resolution parameter is only effective when using nano-banana-2 or nano-banana-pro models
  • Recommended polling interval is 2-5 seconds, avoid frequent requests
Best Practices:
  1. Use application/json format for requests
  2. Prompts should clearly describe the desired image content and style
  3. Reference images can help guide generation style but are not required; up to 6 images are supported
  4. Choose appropriate aspect ratio to match your use case