Nano Banana
nano-banana
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 nano-banana
Input
Showcases
View all showcasesOutput
imagePricing
nano-banana $0.021 per image
Positioning Overview
nano-banana is a text-to-image model released by Google, accessed through the unified HiAPI.ai interface. It excels at converting longer natural language descriptions into finished images, with a prompt limit of 5000 characters. You can specify the aspect ratio and the png or jpeg output format, making it suitable for developers who need to batch-generate marketing visuals, concept art, and illustrations. A single call only handles text input; for image editing, choose the image-to-image route in the same family.
Key Highlights
- Long prompt capacity — prompts can be up to 5000 characters, making it easy to put the subject, composition, and style requirements of the scene into a single description.
- Full set of aspect ratio presets — in addition to 1:1, 16:9, 9:16, 4:3, and 3:4, it also supports ten ratios including 3:2, 2:3, 5:4, 4:5, and 21:9, directly accommodating landscape, portrait, and ultra-wide assets.
- Selectable output format — results can be specified as png or jpeg, reducing post-processing transcoding steps.
Capability Description
- Generation from extra-long text prompts: a single prompt can be up to 5000 characters, suitable for describing more complex multi-element scenes; one call returns one image.
- Controllable aspect ratio: specify the output ratio via aspect_ratio; auto lets the model decide, while the other ratios correspond to common social, e-commerce, and display layouts.
- Output format selection: output_format supports png and jpeg, chosen according to the compression and transparency needs of downstream stages.
Applicable Scenarios
- Batch production of social media images for marketing teams — input long prompts with theme and style descriptions to produce finished 1:1 or 9:16 images for social platform campaigns and event pages.
- Rapid concept draft generation for design teams — describe scenes and atmosphere in text to generate landscape concept images for early-stage direction screening in proposals.
- Wide or vertical asset fills for content teams — generate images with ratios such as 21:9 or 4:5 and drop them directly into article headers or short-video cover slots.
Limitations and Selection Advice
This route only accepts text prompts and does not support image input; when you need to edit based on existing images or blend multiple images, you should switch to the image-to-image route in the same family. The only exposed parameters are aspect ratio and output format; resolution, number of generated images, style strength, and the like are not adjustable; prompts and the image generation process are also not traceable. If your business has high requirements for precise version control or auditability, it is recommended to first validate output stability with a small number of samples before deciding whether to include it in the production workflow.
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: nano-banana
routestringOptionalCurrent fixed value: default
inputobjectRequired
Business parameters for nano-banana and route default — see the parameter table below.
promptstringRequiredminLength 1maxLength 5000The text prompt for image generation, which determines the content and style of the generated image, up to 5000 characters.
image_sizestringOptionalImage size parameter, deprecated; use aspect_ratio instead to control the output ratio.
auto1:116:99:163:44:33:22:3Show all (3)Show less
5:44:521:9aspect_ratiostringOptionalDefault: "auto"The aspect ratio of the output image; defaults to auto (determined automatically by the model).
auto1:116:99:163:44:33:22:3Show all (3)Show less
5:44:521:9output_formatstringOptionalDefault: "png"The format of the output image; defaults to png.
pngjpegcallbackobjectOptional
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": "nano-banana",
"input": {
"prompt": "…",
"aspect_ratio": "auto",
"output_format": "png"
}
}' 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: "nano-banana",
input: {
"prompt": "…",
"aspect_ratio": "auto",
"output_format": "png"
}
}),
});
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": "nano-banana",
"input": {
"prompt": "…",
"aspect_ratio": "auto",
"output_format": "png"
}
},
)
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 →-
Guide
Using Nano-Banana for E-Commerce Product Images via the hiapi API
-
Guide
Nano Banana Pro API: 2K Premium Image Generation on hiapi
Gemini 3 Pro Image quality, commercial licensing, and a quick start — plus when to drop to the standard tier instead.
6 min read -
Guide
Nano Banana Basic Text-to-Image Guide: Aspect Ratio, Negative Space, and Prompt Usage
Use the task API's aspect_ratio and prompt fields to generate clearly composed images for banners and social cards
Related Models
View all models →Same Type
-
Google Virtual Try-On Google $0.107 /image -
Qwen Image 2.1 Alibaba $0.020 /image -
Ideogram V3 Character Ideogram $0.090 /image -
FLUX.2 Black Forest Labs $0.035 /image -
Kling Image 4.0 Kuaishou $0.081 /image -
Nano Banana 2 Lite Google $0.033 /image -
Recraft Crisp Upscale Recraft $0.004 /image -
FLUX.2 Klein 9B Black Forest Labs $0.0086 /image -
BRIA Product Shot Bria $0.058 /image -
GPT Image 2.6 OpenAI $0.023 /image -
BRIA Eraser Bria $0.058 /image -
FLUX 3 Image Klein Black Forest Labs $0.0092 /image
Same Provider
-
Gemini Omni 1.2 Google $0.023 /second -
Veo 3.1 Lite Google $0.060 /second -
Nano Banana 2 Google $0.018 /image -
Gemini Omni 1.1 Google $0.450 /video -
Nano Banana 2 Lite Google $0.033 /image -
Lyria 3.5 Google $0.090 /song -
Veo 3.1 Fast Google $0.170 /second -
Google Virtual Try-On Google $0.107 /image -
Veo 3.1 Google $0.290 /second -
Gemini 3.8 Google $0.227 /1M tokens -
Nano Banana Pro Google $0.029 /image -
Lyria 3 Pro Google $0.140 /song



