Nano Banana Pro API Tutorial
Nano Banana Pro is a high-quality AI image generation model available on UniAll AI. It supports both text-to-image and image-to-image workflows, making it useful for product posters, ecommerce visuals, social media creatives, concept art, and branded image production.
The public model ID for the 1K variant is `NanoBananaPro-1K`.
What Nano Banana Pro can do
Nano Banana Pro supports:
- **Text-to-image**: create images from a written prompt.
- **Image-to-image**: use one reference image plus a prompt to guide the output.
- **Async generation**: submit a task and retrieve the result when processing is complete.
- **Resolution selection**: generate at `1K`, `2K`, or `4K` tiers.
- **Multiple outputs**: request 1 to 4 images per call.
- **Common aspect ratios**: `1:1`, `16:9`, `9:16`, `4:3`, and `3:4`.
Nano Banana Pro is best suited for teams that need consistent, high-quality image generation through an API rather than manual-only creative tools.
Who should use the Nano Banana Pro API?
The API is a good fit for:
- Ecommerce teams generating product posters, listing images, and campaign creatives.
- Marketing teams creating social media visuals and landing page graphics.
- Developers building image generation apps or automated creative workflows.
- Agencies and platform operators who need scalable image generation for end users.
- Product teams that want a simple API for text-to-image and reference-image generation.
Endpoint
Use the UniAll AI image generation endpoint:
```http POST /v1/images/generations ```
The request is asynchronous, so your application should submit the generation request and then handle the returned task/result flow according to your UniAll AI integration.
Required and optional parameters
| Parameter | Type | Required | Notes | |---|---:|---:|---| | `model` | string | Yes | Use `NanoBananaPro-1K` for the 1K public model ID. | | `generation_mode` | string | Yes | Use `text_to_image` or `image_to_image`. | | `prompt` | string | Yes | The main creative instruction. | | `image_url` | string | Required for image-to-image | Reference image URL. PNG, JPEG, and WebP are supported. | | `aspect_ratio` | string | No | Default is `1:1`. Supported: `1:1`, `16:9`, `9:16`, `4:3`, `3:4`. | | `resolution` | string | No | Default is `1K`. Supported: `1K`, `2K`, `4K`. | | `num_images` | integer | No | Default is `1`. Range: 1 to 4. |
Text-to-image example
```json { "model": "NanoBananaPro-1K", "generation_mode": "text_to_image", "prompt": "A premium skincare product poster on a marble surface, soft studio lighting, clean background, high-end commercial photography style.", "aspect_ratio": "1:1", "resolution": "1K", "num_images": 1 } ```
Image-to-image example
```json { "model": "NanoBananaPro-1K", "generation_mode": "image_to_image", "prompt": "Turn this product photo into a premium ecommerce hero image with clean lighting, sharp details, and a modern minimal background.", "image_url": "https://example.com/reference.png", "aspect_ratio": "1:1", "resolution": "1K", "num_images": 1 } ```
Pricing angle
Nano Banana Pro is billed per generated image. On UniAll AI, the listed user price starts at **$0.102 per image** for `1K` and `2K`, and **$0.204 per image** for `4K`. API and partner pricing may differ by account context.
Because pricing is tied to output count and resolution, your estimated cost is generally:
```text cost = unit price for selected resolution × num_images ```
For example, generating 4 images at the 1K user price would estimate to:
```text $0.102 × 4 = $0.408 ```
Failed generations are eligible for refund handling according to the platform configuration, while automatic retry is not enabled by default for this model.
Implementation tips
- Use `1K` for fast previews and early creative exploration.
- Use `2K` when you need sharper assets without jumping to the highest cost tier.
- Use `4K` for final campaign images, posters, or high-resolution ecommerce visuals.
- Keep prompts specific: describe subject, composition, lighting, style, background, and output purpose.
- For image-to-image, provide a clear reference image and use the prompt to describe what should change or remain consistent.
- Store task IDs and final image URLs in your application so users can revisit generated assets.
Example use cases
Ecommerce product image generation
Use Nano Banana Pro to generate product hero images, marketplace listing visuals, seasonal campaign banners, and clean studio-style product shots.
Marketing and social media creatives
Generate square, landscape, or vertical assets for ads, posts, thumbnails, and landing page visuals.
Creative workflow automation
Developers can connect the API to content management systems, ecommerce dashboards, internal design tools, or batch creative pipelines.
Summary
Nano Banana Pro on UniAll AI provides an API-ready image generation workflow with text-to-image, image-to-image, async processing, selectable aspect ratios, and 1K/2K/4K output tiers. For developers, the key starting point is the model ID `NanoBananaPro-1K` and the `/v1/images/generations` endpoint.
常见问题
How do I call the Nano Banana Pro API?
Send a POST request to `/v1/images/generations` with `model` set to `NanoBananaPro-1K`, a `generation_mode` such as `text_to_image` or `image_to_image`, and a required `prompt`. For image-to-image, also include `image_url`.
What resolutions does Nano Banana Pro support?
Nano Banana Pro supports `1K`, `2K`, and `4K` resolution tiers. Use 1K for previews, 2K for sharper production assets, and 4K for high-resolution final outputs.
How is Nano Banana Pro priced on UniAll AI?
Nano Banana Pro is billed per generated image. The listed user price is $0.102 per image for 1K and 2K, and $0.204 per image for 4K. Total cost depends on the selected resolution and `num_images`.