Skip to content
English

Nano Banana Pro

POST /v1/tasks

All models are called through the Unified Async API POST /v1/tasks endpoint; only the input fields differ (see input parameters below).

Model summary

Model name Nano-Banana-Pro
Type Image generation / editing
Endpoint POST /v1/tasks
Pricing See HiAPI Pricing

Nano Banana Pro targets premium brand visuals, reference-based editing, and higher-resolution delivery.

Production guidance

Production guidance
  • For production, pass callback.url at the top level of the request body so HiAPI can notify your service when the task reaches a terminal state.
  • GET /v1/tasks/:id is better for local debugging, low-volume jobs, or fallback reconciliation if a callback is missed.
  • Use callback.when=final. Both success and fail are terminal states, so your service should deduplicate by taskId.

Best suited for

Premium product visuals

Higher-polish product shots, covers, and marketing heroes.

promptresolution
Reference editing

Pass reference image URLs for restyling, rewriting, or commercial cleanup.

image_inputprompt
Higher-resolution delivery

Choose 1K, 2K, or 4K by use case.

resolution
Format control

Choose png or jpg for handoff.

output_format

Request parameters

model string required

Fixed value Nano-Banana-Pro.

example Nano-Banana-Pro
input object required

Business parameters. Reference images are optional.

prompt string required

Image or editing prompt, up to 10000 characters.

image_input string[] optional

Reference image URL array, up to 8 images. Omit it or pass an empty array when unused.

aspect_ratio enum optional

Generated image aspect ratio.

default auto enum: auto1:116:99:163:44:33:22:35:44:521:9
resolution enum optional

Output resolution.

default 1K enum: 1K2K4K
output_format enum optional

Output image format.

default png enum: pngjpg
callback object optional

Optional callback configuration. In production, pass callback.url so HiAPI can notify your service when the task reaches a terminal state.

url string required

HTTPS URL that receives terminal task notifications.

example https://your-domain.com/hiapi/callback
when enum optional

Callback trigger timing. Use final for terminal-state notifications.

default final enum: final

Example requests

Premium product image

Brand visual generation without a reference image.

Request body
{
  "model": "Nano-Banana-Pro",
  "input": {
    "prompt": "A luxury product photo of a banana on black marble",
    "image_input": [],
    "aspect_ratio": "1:1",
    "resolution": "1K",
    "output_format": "png"
  }
}
Reference edit

Pass a reference image for rewriting or commercial polish.

Request body
{
  "model": "Nano-Banana-Pro",
  "input": {
    "prompt": "Turn this reference into a polished ecommerce hero image",
    "image_input": [
      "https://example.com/reference.png"
    ],
    "aspect_ratio": "4:5",
    "resolution": "1K",
    "output_format": "png"
  }
}

Getting the result

  1. The response returns a taskId immediately without waiting for generation to finish.
  2. In production, prefer waiting for callback.url to receive the terminal notification. For local debugging, poll GET /v1/tasks/:id.
  3. When status=success, download the generated image from output[].url.
  4. When status=fail, fix the request based on the returned error instead of retrying the same invalid payload.

Next steps