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/generationsaspect 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 = urlMultipart 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
| Field | Notes |
|---|---|
model | nano-banana-pro 固定。 |
prompt | 必須 text prompt。 |
aspect_ratio | model capability data を参照。一般的な値は 1:1、16:9、auto。 |
resolution | 1K、2K、4K。 |
output_format | png や jpg など特定フォーマットが必要な場合。 |
image_input | optional URL reference。field repeat または array を使える。 |
image / image[] | optional multipart file references。 |
async | true で task mode。 |
Responses and errors
Sync は 200 と data[].url を返します。Async は 202 と task_id、state、poll_url を返します。よくある error status は 400、401、402、502 です。