Nano Banana
gemini-nano-banana-2.1
Designed for natural-language-driven image generation and multi-turn conversational retouching, it preserves character and subject consistency well during edits and covers generation, editing, and enhancement
Try gemini-nano-banana-2.1
Input
Showcases
View all showcasesOutput
imagePricing
gemini-nano-banana-2.1 per image
| Specifications | Unit Price |
|---|---|
| 1K | $0.022 |
| 2K | $0.036 |
| 4K | $0.058 |
Positioning Overview
gemini-nano-banana-2.1 is a model built for image generation and editing scenarios, supporting both text-to-image and image-to-image. Developers can pass in prompts through the unified HiAPI.ai interface to generate images, or upload up to 10 reference images for local modifications, multi-image fusion, and subject-consistent continuous editing. Output can be selected from 1K to 4K resolution and a variety of aspect ratios, making it suitable for teams that need to quickly produce commercial visual assets, iterate on creative concepts, or complete image enhancement.
Core Highlights
- Generation and editing covered on the same path — the same model supports both pure text generation and modifications and fusion based on reference images, reducing the cost of switching models between different tasks.
- Multi-round editing maintains subject consistency — when making continuous conversational modifications, it maintains characters and subjects well, making it suitable for creative iteration that requires carrying the same character across multiple rounds.
- Fusion of up to 10 reference images — multiple images can be passed in at once for tasks such as scene compositing and color scheme merging, reducing the preprocessing workload of combining multiple assets.
- Fine control over resolution and frame size — supports three clarity levels, 1K, 2K, and 4K, and more than ten aspect ratios, allowing output specifications to be matched directly to the distribution channel.
Capability Description
Natural language text-to-image: describe the scene with a prompt to generate an image. The model has strong comprehension of complex instructions, making it suitable for getting usable visual drafts directly from concept descriptions.
Reference-image-driven image editing: upload reference images along with modification requirements to perform operations such as background replacement, object addition and removal, texture and lighting adjustment, and local retouching.
Multi-image fusion and scene compositing: pass in up to 10 reference images at once to place objects into a specified scene or merge color schemes, suitable for product scene images and composited asset production.
On-demand output specifications: select 1K to 4K resolution, fifteen aspect ratios, and JPG or PNG format. Output directly matches channel requirements, reducing secondary processing.
Applicable Scenarios
- Marketing and social media asset production — input campaign themes and brand element descriptions to generate promotional images adapted to different aspect ratios, for rapid delivery of social media placements and advertising assets.
- Continuous creative iteration with consistent characters — use character reference images with multi-round editing instructions to produce storyboards and character design sheets, for animation previews or series content production.
- Product scene images and background replacement — upload product images and describe the target scene to composite product display images with environmental lighting, for e-commerce detail pages and catalog materials.
- Old photo restoration and colorization — input photos to be restored and specify enhancement requirements to obtain sharpened or colorized images, for archive organization and family photo preservation.
- Concept prototypes and diagram illustrations — generate concept images based on text descriptions or structural diagrams, for design reviews, teaching materials, and visual explanations in proposals.
Limitations and Selection Advice
This model centers on image output and does not handle text Q&A or video generation; the maximum resolution is 4K, and higher-definition output requires separate upscaling. The results of multi-round editing and multi-image fusion depend on the quality of prompts and reference images; for complex compositing, it is recommended to validate with a small batch first. If the task is mainly rapid batch image generation, the same-family nano-banana can be evaluated; if a complex workflow with long context is required, confirm version capabilities before selecting. Output may carry invisible provenance markers, which should be evaluated in advance when used for copyright attribution scenarios.
Frequently asked questions
View all FAQs →-
What is Nano Banana best for?
A general-purpose image generator for illustration, photography, product concepts, and social visuals.
-
Does Nano Banana accept reference images?
No. This route is text-to-image only.
-
Which output settings are supported?
The page exposes 1K and auto, 1:1, 16:9, 9:16, 3:4, 4:3, 3:2, 2:3, 5:4, 4:5, 21:9; use the Playground contract for the final available set.
-
How is Nano Banana billed?
Billing is per successful generated image. Resolution or quality differences, when present, are reflected by the live page price.
Create a generation task
https://api.hiapi.ai/v1/tasks Headers
AuthorizationstringRequiredAccount API key. Required on every request. Example: Bearer YOUR_HIAPI_API_KEY. Get your API key
Content-TypestringOptionalThe request body is always parsed as JSON; when sent, only application/json (optionally with charset) is accepted — any other value returns 415. Example: application/json.
Idempotency-KeystringOptionalIdempotency key, up to 255 bytes. Retries with the same key from the same account create the task only once; replays return the original taskId.
On network timeouts or client retries, the same key creates the task only once — no double charges (scope: the API key's account). Use a business-unique identifier as the key (e.g. "order-42"); replays return the original taskId, and keys expire 24 hours after the first request. See the Unified Async API overview for the full scenario matrix.
Body
modelstringRequiredCurrent fixed value: gemini-nano-banana-2.1
routestringOptionalCurrent fixed value: default
inputobjectRequired
Business parameters for gemini-nano-banana-2.1 and route default — see the parameter table below.
promptstringRequiredminLength 1maxLength 20000Prompt used to describe the visual content to be generated, or to specify modification requests for a reference image; provided as a string.
resolutionstringOptionalDefault: "1K"The clarity level of the output image, provided as a string; defaults to 1K.
1K2K4Kimage_inputarrayOptionalmaxItems 10An array of reference images, whose elements are images used for image editing or blending; supports JPEG, PNG, and WebP, each no larger than 30 MB; its subfields are documented separately.
Array [ string ]
aspect_ratiostringOptionalDefault: "auto"The aspect ratio of the image, provided as a string; defaults to auto, where the ratio is determined automatically based on the input.
1:12:33:21:44:13:44:34:5Show all (7)
5:41:88:19:1616:921:9autooutput_formatstringOptionalDefault: "jpg"The file format of the output image, provided as a string; defaults to jpg.
jpgpngcallbackobjectOptional
Terminal-state notification config. When omitted, no callback is delivered — poll the task yourself. See the callback note below.
Provide callback.url when creating a task and HiAPI POSTs to your service once the task reaches a terminal state — no polling needed. The callback payload mirrors the task detail structure; signature verification, delivery retries and idempotency are documented on the Unified Async API overview page.
urlstringRequiredRequired when callback is present. A POST is sent to this URL once the task reaches a terminal state; must be a valid http(s) URL.
whenstringOptionalDefault: "final"Only final is supported today — notified on both success and fail.
finalstoragestringOptionalDefault: "temp"Artifact storage tier: temp (default, retained about 7 days) or persistent (long-term, billed by size). Insufficient balance or exceeding the storage cap silently downgrades to temp; the effective tier is shown in the task detail response.
temppersistentRequest examples
# Submit an async task; returns a taskId immediately (no waiting for generation)
curl -X POST "https://api.hiapi.ai/v1/tasks" \
-H "Authorization: Bearer $HIAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gemini-nano-banana-2.1",
"input": {
"prompt": "…",
"resolution": "1K",
"aspect_ratio": "auto",
"output_format": "jpg"
}
}' const res = await fetch("https://api.hiapi.ai/v1/tasks", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.HIAPI_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "gemini-nano-banana-2.1",
input: {
"prompt": "…",
"resolution": "1K",
"aspect_ratio": "auto",
"output_format": "jpg"
}
}),
});
const task = await res.json();
// { code: 200, message: "success", data: { taskId } } import os, requests
res = requests.post(
"https://api.hiapi.ai/v1/tasks",
headers={"Authorization": f"Bearer {os.environ['HIAPI_API_KEY']}"},
json={
"model": "gemini-nano-banana-2.1",
"input": {
"prompt": "…",
"resolution": "1K",
"aspect_ratio": "auto",
"output_format": "jpg"
}
},
)
print(res.json()) # { code, message, data: { taskId } } 200 OK
{
"code": 200,
"message": "success",
"data": {
"taskId": "tk-hiapi-01HZTQ8BX2N3GM3YFK4Z9D7VQR"
}
} 400 Bad Request
{
"code": 400,
"message": "invalid request",
"data": null,
"error_code": "INVALID_REQUEST"
} Get task detail
https://api.hiapi.ai/v1/tasks/:id Response fields
taskIdstringRequiredTask ID, always prefixed with tk-hiapi-.
modelstringRequiredResolved full model name. Tasks submitted with the route parameter return base@route (e.g. gpt-image-2/text-to-image@ext); otherwise identical to the name passed at creation.
routestringOptionalPresent only when the task was submitted with an explicit route parameter; echoes the submitted value.
statusstringRequiredTask status.
queued Queued, not started yet.
handling Being processed.
archiving Processing finished, artifacts being prepared.
success Terminal: completed, artifacts available (output returned).
fail Terminal: failed (error returned).
After submission, check status: success and fail are terminal, everything else is non-terminal. Poll every 1–3 seconds until terminal. On success, download artifacts from output[].url and transfer them before expireAt; pass storage: "persistent" at creation time when long-term retention is needed.
creatednumberRequiredTask creation time (Unix seconds).
completednumberRequiredUnix seconds when the task reached a terminal state; fixed to 0 while not terminal.
outputarrayOptional
Present only when status == success. Artifact list — always an array; a single task may return multiple types at once (e.g. video + first_frame).
Array [ object ]
Array items
urlstringRequiredArtifact URL, directly downloadable.
typestringRequiredCurrent possible values: video, image, audio, first_frame, last_frame, thumbnail; more may be added later.
expireAtnumberRequiredUnix seconds until which the artifact remains accessible; download or transfer before it expires.
errorobjectOptional
Present only when status == fail.
codestringRequiredBusiness error code.
messagestringRequiredError description.
Response examples
Success
{
"code": 200,
"message": "success",
"data": {
"taskId": "tk-hiapi-01HZTQ8BX2N3GM3YFK4Z9D7VQR",
"model": "happyhorse-1-0",
"status": "success",
"created": 1777282033,
"completed": 1777282099,
"output": [
{
"url": "https://cdn.hiapi.ai/tasks/.../video.mp4",
"type": "video",
"expireAt": 1777886899
}
]
}
} Processing (non-terminal)
{
"code": 200,
"message": "success",
"data": {
"taskId": "tk-hiapi-...",
"model": "happyhorse-1-0",
"status": "archiving",
"created": 1777282033,
"completed": 0
}
} Failed
{
"code": 200,
"message": "success",
"data": {
"taskId": "tk-hiapi-...",
"model": "happyhorse-1-0",
"status": "fail",
"created": 1777282033,
"completed": 1777282099,
"error": {
"code": "TASK_FAILED",
"message": "task failed"
}
}
} Articles
View all articles →Related Models
View all models →Same Type
-
Seedream 4.5 ByteDance $0.045 /image -
BRIA Product Shot Bria $0.058 /image -
Imagen 4 Google $0.030 /image -
FLUX.2 Klein 9B Black Forest Labs $0.0086 /image -
Ideogram V4 Ideogram $0.050 /image -
Qwen Image 3.0 Alibaba $0.036 /image -
Ideogram V4.5 Ideogram $0.011 /image -
Recraft V4.1 Recraft $0.010 /image -
Grok Imagine Quality xAI $0.070 /image -
Recraft Creative Upscale Recraft $0.357 /image -
GPT Image 2 OpenAI $0.007 /image -
Grok Imagine Image 2.0 xAI $0.052 /image
Same Provider
-
Lyria 3 Pro Google $0.140 /song -
Lyria 3.5 Google $0.090 /song -
Nano Banana 2 Google $0.036 /image -
Nano Banana 2 Lite Google $0.033 /image -
Veo 3.1 Fast Google $0.170 /second -
Gemini Omni 1.1 Flash Google $0.450 /video -
Gemini Omni Google -- -
Gemini 3.1 Flash TTS Google -- -
Veo 3.1 Google $0.290 /second -
Google Virtual Try-On Google $0.107 /image -
Nano Banana Pro Google $0.057 /image -
Veo 3.1 Lite Google $0.060 /second















