Xenodia Docs
API リファレンス

Nano Banana Pro API

Xenodia で Nano Banana Pro の resolution tiers、aspect ratio、output format、reference input、async 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"
}

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"
}

返された 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 "async=true" \
  -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。
asynctrue で task mode。

Responses and errors

Sync は 200data[].url を返します。Async は 202task_idstatepoll_url を返します。よくある error status は 400401402502 です。

このページ