Xenodia Docs
API リファレンス

Nano Banana Pro API

Use Nano Banana Pro through Xenodia with resolution tiers, aspect ratio, output format, reference input, and task mode.

nano-banana-pro は shared image endpoint を使います:

POST https://api.xenodia.xyz/v1/images/generations

aspect ratio、resolution、output format、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"
}

Task request

{
  "model": "nano-banana-pro",
  "prompt": "Create a polished product hero image for Xenodia docs.",
  "aspect_ratio": "16:9",
  "resolution": "4K",
  "response_format": "url"
}

返された task は Task Retrieval で polling します。

Reference inputs

Nano Banana Pro は prompt-only generation、URL references、multipart file references、mixed reference input をサポートします。

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 = url

Multipart example:

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 "aspect_ratio=16:9" \
  -F "resolution=4K" \
  -F "response_format=url" \
  -F "image=@./reference.png"

Parameters

FieldNotes
modelnano-banana-pro 固定。
prompt必須 text prompt。
aspect_ratiomodel capability data を参照。一般的な値は 1:116:9auto
resolution1K2K4K
output_formatpngjpg など特定フォーマットが必要な場合。
image_inputoptional URL reference。field repeat または array を使える。
image / image[]optional multipart file references。
asyncDeprecated compatibility field. Image generation always returns a 202 task envelope.

Responses and errors

The request returns 202 with task_id, state, and poll_url. Poll the task for the final result.data[].url. Common error statuses are 400, 401, 402, and 502.

このページ