# Nano Series Image Generation This file is the focused AI-readable context for one UniAll documentation page. URL: https://docs.uniall.ai/models/image/nano-series Locale: en Markdown: https://docs.uniall.ai/ai/pages/models/image/nano-series.md Description: Generate or edit images with NanoBanana family models through UniAll image APIs. Agent guidance: - Use this page when the user is asking about this specific route or model capability. - Preserve endpoint paths, JSON keys, model IDs, and placeholder values exactly. - Treat examples such as `sk-***`, `{BASE_URL}`, and `task_xxx` as safe placeholders, not real secrets. ## Page Markdown Nano Series covers the NanoBanana family. Use it when you need a concrete Nano model tier and `aspect_ratio`-based shape control. The source scope includes both OpenAI-compatible and Gemini-compatible entry points, but new general integrations can start from the async image task flow. ## Supported Models | Model family | Example IDs | Notes | | --- | --- | --- | | NanoBanana | `NanoBanana` | Base NanoBanana model. | | NanoBanana Pro | `NanoBananaPro-*` | Pro tier variants. | | NanoBanana 2 | `NanoBanana2-0.5K`, `NanoBanana2-1K` | Resolution-tiered NanoBanana 2 variants. | Actual availability depends on account channel and model-price configuration. ## Recommended Endpoint ```http POST /v1/images/tasks GET /v1/images/tasks/{task_id} ``` The Apifox source also exposes OpenAI-compatible image endpoints for Nano: ```http POST /v1/images/generations POST /v1/images/edits ``` and a Gemini-compatible format for Gemini-style clients. Use the format that matches your client. The request concepts below stay the same. ## Authentication ```http Authorization: Bearer sk-*** Content-Type: application/json ``` ## Request Parameters | Parameter | Type | Required | Description | | --- | --- | --- | --- | | `model` | string | Yes | Concrete Nano model ID, such as `NanoBanana2-0.5K`. | | `prompt` | string | Yes | Generation or editing prompt. | | `task_type` | string | No | `text2image` or `image2image`. Can be inferred from image input. | | `image` | string/object | Conditional | Single reference image for editing. | | `images` | string[] | Conditional | Multiple reference image URLs. | | `aspect_ratio` | string | No | Recommended shape control, such as `1:1`, `16:9`, `9:16`, `4:3`, or `3:4`. | | `output_format` | string | No | `NanoBanana` supports `png`, `jpeg`, `webp`; Pro and NanoBanana 2 variants support `png` and `jpeg` in the current source scope. | | `n` | integer | No | Output count. Default is `1`; maximum depends on upstream limits. | | `response_format` | string | No | Prefer `url`. | ## Text-To-Image Example ```bash curl -X POST "{BASE_URL}/v1/images/tasks" \ -H "Authorization: Bearer sk-***" \ -H "Content-Type: application/json" \ -d '{ "model": "NanoBanana2-0.5K", "task_type": "text2image", "prompt": "A small red cube on a clean white desk, minimal product photo, soft daylight", "aspect_ratio": "1:1", "output_format": "png", "n": 1, "response_format": "url" }' ``` ## Image-To-Image Example ```bash curl -X POST "{BASE_URL}/v1/images/tasks" \ -H "Authorization: Bearer sk-***" \ -H "Content-Type: application/json" \ -d '{ "model": "NanoBanana2-0.5K", "task_type": "image2image", "prompt": "Turn the reference image into a clean product render", "image": "https://example.com/input.png", "aspect_ratio": "16:9", "output_format": "jpeg", "n": 1, "response_format": "url" }' ``` ## Query Task Status ```bash curl "{BASE_URL}/v1/images/tasks/task_xxx" \ -H "Authorization: Bearer sk-***" ``` ```json { "code": "success", "message": "", "data": { "task_id": "task_xxx", "status": "succeeded", "progress": "100%", "result_url": "https://example.com/result.png", "metadata": { "task_type": "text2image", "result_count": 1 }, "error": null } } ``` ## Billing Notes NanoBanana family models are billed by configured model unit price multiplied by `n` or the actual returned result count. `aspect_ratio` and `output_format` control output shape and format, but are not separate billing dimensions in the current source scope. ## Common Errors - Passing a Nano model ID that is not enabled for the current account. - Mixing `image` and `images` with compatibility image fields. - Treating `size` as the primary Nano control; use `aspect_ratio` instead. - Requesting an unsupported output format for the selected Nano family. - Polling before the task has been created. ## Related Pages - [Async Image Generation](/models/image/async-image-generation) - [GPT-Image-2 Image Generation](/models/image/gpt-image-2) - [Seedream Image Generation](/models/image/seedream)