Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.xingchaoyiqing.com/llms.txt

Use this file to discover all available pages before exploring further.

The Nano Banana image generation endpoint creates an async task that generates high-quality AI images from a text prompt. You’ll receive a task ID to poll for the result. Because generation happens asynchronously, your application can continue doing other work while the image is being produced.

Base URL

https://zcbservice.aizfw.cn/kyyReactApiServer

Endpoint

POST /v1/banana/images

Authentication

Include your API key as a Bearer token in the Authorization header on every request:
Authorization: Bearer YOUR_API_KEY

Models

Choose the model that best fits your quality and speed requirements.
ModelDescription
nano-bananaBase model, fast generation
nano-banana-2Enhanced model with resolution support
nano-banana-proProfessional — up to 4K
nano-banana-2-stableStable version of nano-banana-2
nano-banana-pro-stableStable professional version

Request Parameters

model
string
required
The model to use for image generation. See the Models table above for valid values.
prompt
string
required
A text description of the image you want to generate. Clear, descriptive prompts produce the best results. Example: "A cute orange cat sitting on a windowsill, golden hour lighting".
resolution
string
default:"1k"
The output resolution of the generated image. Defaults to 1k for all models.
ValueResolution
1k1K resolution (default, supported by all models)
2k2K resolution (supported by nano-banana-pro and nano-banana-pro-stable)
4k4K resolution (supported by nano-banana-pro and nano-banana-pro-stable)
nano-banana, nano-banana-2, and nano-banana-2-stable have limited resolution capability — use 1k for these models.
size
string
The aspect ratio of the generated image. If omitted, the model uses its default aspect ratio.Supported values: 1:1, 16:9, 9:16, 4:3, 3:4, 3:2, 2:3, 5:4, 4:5, 21:9
image_urls
array
An array of reference image URLs used to guide the style of the generated image. You may provide up to 6 images. Reference images are optional but can significantly improve style consistency.

Response Fields

id
string
The unique task ID for this generation job. Use this value to poll the Query Image Task endpoint for the result.
object
string
The object type. Always nanobanana.
created
integer
Unix timestamp indicating when the task was created.
model
string
The model name used for this task.
status
string
The initial task status. Will be queued or processing immediately after creation.
ValueMeaning
queuedTask is waiting in the queue
processingTask is actively being processed
error
string
An error message describing what went wrong. Only present when status is failed.

Code Example

curl -X POST https://zcbservice.aizfw.cn/kyyReactApiServer/v1/banana/images \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "nano-banana-2",
    "prompt": "A cute orange cat sitting on a windowsill, golden hour lighting",
    "resolution": "2k",
    "size": "16:9"
  }'

Success Response

{
  "id": "abc123",
  "object": "nanobanana",
  "created": 1761635478,
  "model": "nano-banana-2",
  "status": "queued"
}

Failure Response

{
  "id": "abc123",
  "object": "nanobanana",
  "created": 1761635478,
  "model": "nano-banana-2",
  "status": "failed",
  "error": "Invalid prompt: content policy violation"
}

Image generation is processed asynchronously. The create endpoint returns a task id immediately — use that ID with the Query Image Task endpoint (GET /v1/result/{id}) to check task status and retrieve your image URL when generation is complete.
Polling interval: Check the task status every 2–5 seconds. Polling too frequently may result in rate limiting, while longer intervals simply delay when you first see the result. Stop polling as soon as status is completed or failed.