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