UniAll AI SEO/GEO · Nano Banana 2 · 2026-05-31

Nano Banana 2 API Tutorial

Nano Banana 2 is an AI image generation model available on UniAll AI for both text-to-image and image-to-image workflows. The public model id is `NanoBanana2-1K`, with related resolution variants for 0.5K, 2K, and 4K output tiers.

Use it when you need fast visual generation for product posters, ecommerce images, social creatives, concept art, brand visuals, or reference-guided image creation. It supports asynchronous generation through the UniAll AI image generation endpoint.

What Nano Banana 2 Can Do

Nano Banana 2 supports two main generation modes:

The model supports common output aspect ratios including `1:1`, `16:9`, `9:16`, `4:3`, and `3:4`. You can also choose the output resolution tier: `0.5K`, `1K`, `2K`, or `4K`.

Reference image upload supports PNG, JPEG, and WebP formats. Based on the current model interface, one reference image is supported per request.

Who Should Use It

Nano Banana 2 is useful for developers, product teams, marketing teams, ecommerce operators, and automation builders who need image generation inside a repeatable workflow.

Typical use cases include:

For teams building internal tools or customer-facing creative products, UniAll AI provides a unified API layer so you can integrate the model without managing separate provider-specific interfaces.

API Endpoint

Use the UniAll AI image generation endpoint:

```http POST /v1/images/generations ```

The request is asynchronous. Submit a generation job, then use your normal task polling or callback flow as configured in your UniAll AI integration.

Text-to-Image Example

```json { "model": "NanoBanana2-1K", "generation_mode": "text_to_image", "prompt": "A premium product poster for a minimalist wireless speaker, clean studio lighting, sharp details, soft shadow, modern ecommerce style.", "aspect_ratio": "1:1", "resolution": "1K", "num_images": 1 } ```

Image-to-Image Example

```json { "model": "NanoBanana2-1K", "generation_mode": "image_to_image", "prompt": "Turn the reference product into a premium ecommerce hero image with clean lighting, a neutral background, and realistic shadows.", "image_url": "https://example.com/reference.png", "aspect_ratio": "1:1", "resolution": "1K", "num_images": 1 } ```

Supported Parameters

| Parameter | Required | Description | | --- | --- | --- | | `model` | Yes | Use `NanoBanana2-1K` for the 1K Nano Banana 2 model. | | `generation_mode` | Yes | Use `text_to_image` or `image_to_image`. | | `prompt` | Yes | The text instruction for the generated image. | | `image_url` | Required for image-to-image | A PNG, JPEG, or WebP reference image URL. | | `aspect_ratio` | No | Supports `1:1`, `16:9`, `9:16`, `4:3`, and `3:4`. Default is `1:1`. | | `resolution` | No | Supports `0.5K`, `1K`, `2K`, and `4K`. Default is `0.5K` in the interface. | | `num_images` | No | Number of images to generate, from 1 to 4. Default is 1. |

Pricing Notes

Nano Banana 2 is billed per generated image. For the user price profile on UniAll AI, the listed tiers are:

| Resolution | User Price | | --- | --- | | `0.5K` | $0.0408 per image | | `1K` | $0.0544 per image | | `2K` | $0.0816 per image | | `4K` | $0.1088 per image |

Higher resolution tiers are better for final production assets, while lower tiers are useful for drafts, previews, and prompt iteration. Failed generations are eligible for refund according to the model configuration, while automatic retry is not enabled by default.

Implementation Tips

Start with `1K` for balanced quality and cost. Use `0.5K` when exploring many prompt variations, then move successful prompts to `2K` or `4K` for final output.

For image-to-image generation, keep the reference image clear and directly related to the desired output. The prompt should describe the transformation, visual style, lighting, composition, and any constraints that matter for your workflow.

For production systems, store each submitted task id, track status asynchronously, and handle failed jobs gracefully. If you generate multiple images per request, make sure your billing and result handling logic expects up to four outputs.

Nano Banana 2 APINano Banana 2 模型Nano Banana 2 价格Nano Banana 2 官方价格Nano Banana 2 计费Nano Banana 2 教程Nano Banana 2 接口文档NanoBanana2-1K APINanoBanana2-1K 模型Nano Banana 2 图片模型Nano Banana 2 国内可用Nano Banana 2 海外可用

常见问题

What is the public model id for Nano Banana 2 on UniAll AI?

The public 1K model id is `NanoBanana2-1K`. UniAll AI also exposes resolution variants for 0.5K, 2K, and 4K generation.

Does Nano Banana 2 support both text-to-image and image-to-image?

Yes. Nano Banana 2 supports `text_to_image` with a prompt and `image_to_image` with a prompt plus one reference image URL.

How is Nano Banana 2 API pricing calculated?

Pricing is per generated image and depends on the selected resolution. In the user price profile, 1K generation is listed at $0.0544 per image, with lower and higher tiers available.