Nano Banana Pro API
Use Nano Banana Pro on Xenodia with resolution tiers, aspect ratio controls, output format, reference inputs, and async task mode.
nano-banana-pro uses the shared image endpoint:
POST https://api.xenodia.xyz/v1/images/generationsUse this page when you need explicit control over aspect ratio, resolution, output format, and reference images.
Request
{
"model": "nano-banana-pro",
"prompt": "A clean studio render of a developer API dashboard on a glass desk.",
"aspect_ratio": "16:9",
"resolution": "2K",
"output_format": "png",
"response_format": "url"
}Async request
{
"model": "nano-banana-pro",
"prompt": "Create a polished product hero image for Xenodia docs.",
"async": true,
"aspect_ratio": "16:9",
"resolution": "4K",
"response_format": "url"
}Poll the returned task through Task Retrieval.
Reference inputs
Nano Banana Pro supports prompt-only generation, URL references, multipart file references, and mixed reference input.
Current public rule:
reference_input.max_items = 8
accepted_mime = image/jpeg, image/png, image/webp
max_size_per_file_bytes = 31457280
transport = url, multipart_file
response_format = urlURL references use image_input; multipart references use image or image[]:
curl -X POST "https://api.xenodia.xyz/v1/images/generations" \
-H "Authorization: Bearer $XENODIA_API_KEY" \
-F "model=nano-banana-pro" \
-F "prompt=Create a polished product hero image using this reference." \
-F "async=true" \
-F "aspect_ratio=16:9" \
-F "resolution=4K" \
-F "response_format=url" \
-F "image=@./reference.png"Parameters
| Field | Notes |
|---|---|
model | Must be nano-banana-pro. |
prompt | Required text prompt. |
aspect_ratio | Model capability data exposes the current enum. Common values include 1:1, 16:9, and auto. |
resolution | 1K, 2K, or 4K. |
output_format | Use when you need a specific image format such as png or jpg. |
image_input | Optional URL reference. Repeat the field or use an array for multiple references. |
image / image[] | Optional multipart file references. |
async | Set true for task mode. |
Responses and errors
Sync requests return 200 with data[].url. Async requests return 202 with task_id, state, and poll_url. Poll with Task Retrieval.
Common error statuses are 400 for invalid parameters, 401 for missing or invalid keys, 402 for billing boundaries, and 502 for upstream generation failures.
Pricing model
Nano Banana Pro is priced by resolution tier. Treat pricing as catalog data: query /v1/models before displaying price-sensitive UI.