Nano Banana 2 Lite
Fast image generation and editing with long prompts, automatic aspect ratio, and up to 10 reference images
機能
- Text-to-image generation
- Image-to-image editing
- Up to 10 reference images
- Prompts up to 20,000 characters
- Automatic and extreme aspect ratios
料金設定
| Mode | Credits |
|---|---|
| Fixed 1K output | 6 (~$0.07) |
エンドポイント
POST
/api/v1/images/generateパラメータ
| パラメータ | タイプ | 必須 | 説明 |
|---|---|---|---|
| model | string | 必須 | Must be "nano-banana-2-lite" |
| type | string | オプション | "text-to-image" or "image-to-image" (default: text-to-image) |
| prompt | string | 必須 | Text description of the image to generate. Supports 3 to 20,000 characters. |
| aspect_ratio | string | オプション | "auto", "1:1", "1:4", "1:8", "2:3", "3:2", "3:4", "4:1", "4:3", "4:5", "5:4", "8:1", "9:16", "16:9", or "21:9" (default: auto) |
| image_urls | string[] | オプション | Input image URLs for image-to-image. Supports up to 10 JPEG, PNG, or WebP images, 30MB each. |
| input_image | string | オプション | Deprecated. Alias for image_urls[0] |
| num_images | number | オプション | Must be 1 |
リクエスト例(テキストから画像)
{
"model": "nano-banana-2-lite",
"prompt": "A clean product photo of a translucent wireless speaker on a marble table, soft daylight, crisp details",
"aspect_ratio": "auto"
}リクエスト例(画像から画像)
{
"model": "nano-banana-2-lite",
"type": "image-to-image",
"prompt": "Keep the product shape and materials, change the scene into a bright minimalist studio campaign image",
"image_urls": ["https://tempfile.aiquickdraw.com/workers/nano/image_1772780968156_ygk0zm.png"],
"aspect_ratio": "16:9"
}レスポンス例
{
"success": true,
"data": {
"task_id": "task_nb2_lite_abc123",
"credits_used": 6,
"remaining_credits": 494,
"model": "nano-banana-2-lite"
}
}コード例(テキストから画像)
curl -X POST https://gateway.bananapro.site/api/v1/images/generate \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "nano-banana-2-lite",
"prompt": "A clean product photo of a translucent wireless speaker on a marble table, soft daylight, crisp details",
"aspect_ratio": "auto"
}'コード例(画像から画像)
curl -X POST https://gateway.bananapro.site/api/v1/images/generate \
-H "Authorization: Bearer sk-your-api-key" \
-H "Content-Type: application/json" \
-d '{
"model": "nano-banana-2-lite",
"type": "image-to-image",
"prompt": "Keep the product shape and materials, change the scene into a bright minimalist studio campaign image",
"image_urls": ["https://tempfile.aiquickdraw.com/workers/nano/image_1772780968156_ygk0zm.png"],
"aspect_ratio": "16:9"
}'