
A young woman with short red hair and round glasses wearing a dark green trench coat, standing in a rainy Tokyo street at night. Neon signs reflected in puddles. Cinematic still, anamorphic lens look.
Gemini 3.1 Flash Image: fast generation and editing with strong text rendering, 1K–4K.
from$0.036/ image$0.0410% off
Model IDnano-banana-2
Input
Text · Image
Output
Image
Provider
7 providers
Aspect ratio
1:1 · 16:9 · 9:16 · 4:3 · 3:4 · 3:2 · 2:3 · 4:5 · 5:4 · 21:9
Resolution
1K · 2K · 4K
Images
1 – 4
Last 7 days · not enough recent requests for stats yet.
Prices are per unit; requests without a provider are routed to the cheapest provider that supports your parameters.
| Option | 1K | 2K | 4K |
|---|---|---|---|
| All options | $0.036 / image 4 Credits | $0.054 / image 6 Credits | $0.081 / image 9 Credits |
Test output quality, compare provider prices and estimate cost before writing any code.
Enter a prompt to compare provider prices.
Ready-to-use prompts. Load one into the playground and tweak it.
22 prompts

A young woman with short red hair and round glasses wearing a dark green trench coat, standing in a rainy Tokyo street at night. Neon signs reflected in puddles. Cinematic still, anamorphic lens look.

An isometric 3D miniature diorama of a cozy Japanese ramen shop at night. Warm light spills from the entrance. Tiny detailed figures sit at the counter. Steam rises from bowls of ramen. Rain puddles reflect neon signs on the street. Tilt-shift photography effect.

An action shot of a black lab swimming in an inground suburban swimming pool. The camera is placed meticulously on the water line, dividing the image in half, revealing both the dogs head above water holding a tennis ball in it's mouth, and it's paws paddling underwater.

cyberpunk megacity at night, heavy rain, neon lights reflecting on wet streets, dense futuristic skyscrapers, giant holographic advertisements, flying vehicles in the sky, thick fog and atmospheric haze, moody cinematic lighting, dark dystopian atmosphere, ultra detailed, cinematic composition, 35mm film still, volumetric lighting, cyberpunk aesthetic

a vast open wilderness where colossal animal-like machines roam across green valleys and rivers, towering mountains and ancient futuristic ruins in the distance, a lone huntress observing from a cliff edge, wind sweeping across tall grass, sunlight illuminating metallic bodies of the machines, cinematic wide angle composition, monumental environmental scale, vibrant yet mysterious atmosphere, ultra realistic, horizon aesthetic

a lone futuristic courier walking through a vast desolate landscape during a heavy timefall rainstorm, carrying tall stacks of cargo containers on his back, dark clouds covering the sky, rain falling in long streaks and splashing on the ground, wet rocky terrain and muddy paths reflecting dim light, the courier wearing a high-tech delivery suit with cables and sensors, a transparent protective hood over his head, mist drifting across the valley, distant mountains fading into the rain, cinematic ultra wide shot, epic environmental scale, melancholic and tense atmosphere, ultra realistic, post-apocalyptic sci-fi world, death stranding style
Endpoints, request fields and runnable examples for this model.
Base URL
https://01router.com/api/v1Set API_KEY to your project key, then run a sample from your server. Replace example media URLs with your own public URLs.
Auto-routing chooses a provider that supports the request. Select a provider to see its input constraints and pinned request examples.
curl https://01router.com/api/v1/generations \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"model": "nano-banana-2",
"input": {
"prompt": "A cinematic shot of a red fox running through snow",
"aspect_ratio": "1:1",
"resolution": "1K",
"num_images": 1
}
}
JSON
# Replace GENERATION_ID with the id returned above; poll until status is "succeeded" or "failed"
curl https://01router.com/api/v1/generations/GENERATION_ID -H "Authorization: Bearer $API_KEY"Only endpoints relevant to this model are listed. Paths below include /api/v1. Click an endpoint to read its usage.
/api/v1/generationsCreate a generation (charges credits) · API key required
/api/v1/generations/{id}Get a generation; polls the provider while running · API key required
/api/v1/generations/{id}/cancelCancel a running generation (credits refunded) · API key required
/api/v1/quotePrice a request on every provider (no charge, no key needed) · Public · no key
/api/v1/images/generationsOpenAI-compatible image generation (waits for the result) · API key required
/api/v1/models/nano-banana-2Get one model · Public · no key
Send your API key as a Bearer token. Requests are billed to the key owner's credits.
Authorization: Bearer YOUR_API_KEY
Content-Type: application/jsonSend JSON with Content-Type: application/json. Model parameters belong inside input; model, provider and callback_url are top-level fields.
| Name | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | "nano-banana-2" |
| provider | string | No | Pin a provider; omit to auto-route to the cheapest. One of: fal | replicate | wavespeed | kie | evolink | atlascloud | openrouter |
| input | object | Yes | Model parameters, see the input fields below. |
| callback_url | string | No | Optional public HTTPS webhook URL. The final task result is signed and delivered here; polling remains available. |
Required fields are marked explicitly. Other fields use the listed defaults when omitted.
| Name | Type | Required | Values | Default |
|---|---|---|---|---|
| prompt* | string | Yes | — | — |
| image_urls Optional — switches to image editing | string[] | No | maxItems: 14 | — |
| aspect_ratio | string | No | 1:1 | 16:9 | 9:16 | 4:3 | 3:4 | 3:2 | 2:3 | 4:5 | 5:4 | 21:9 | 1:1 |
| resolution | string | No | 1K | 2K | 4K | 1K |
| num_images | integer | No | min: 1 · max: 4 | 1 |
Creating a task does not mean generation has finished. Keep its id, poll until succeeded or failed, then read outputs or error. Amounts below are illustrative; actual charges depend on the request.
{
"id": "gen_example",
"object": "generation",
"model": "nano-banana-2",
"type": "image",
"provider": "fal",
"status": "processing",
"input": {
"prompt": "A cinematic shot of a red fox running through snow",
"aspect_ratio": "1:1",
"resolution": "1K",
"num_images": 1
},
"outputs": [],
"error": null,
"credits": 0,
"price_usd": 0,
"created_at": "2026-10-25T08:00:00.000Z",
"completed_at": null
}{
"id": "gen_example",
"object": "generation",
"model": "nano-banana-2",
"type": "image",
"provider": "fal",
"status": "succeeded",
"input": {
"prompt": "A cinematic shot of a red fox running through snow",
"aspect_ratio": "1:1",
"resolution": "1K",
"num_images": 1
},
"outputs": [
"https://example.com/output.png"
],
"error": null,
"credits": 0,
"price_usd": 0,
"created_at": "2026-10-25T08:00:00.000Z",
"completed_at": "2026-10-25T08:01:00.000Z"
}| Name | Type | Required | Description |
|---|---|---|---|
| id | string | Yes | Generation ID. Use it to query or cancel this task. |
| object | string | Yes | generation |
| model | string | Yes | nano-banana-2 |
| type | string | Yes | image |
| provider | string | Yes | Provider |
| status | string | Yes | queued → processing → succeeded / failed. Stop polling at either terminal state. |
| input | object | Yes | Model parameters, see the input fields below. |
| outputs | string[] | Yes | Result URLs. Empty while processing; read after succeeded and save the files promptly. |
| error | string | null | Yes | Failure reason, or null when no failure is reported. |
| credits | number | Yes | Credits charged for this request. |
| price_usd | number | Yes | Request price in USD. |
| created_at | string | Yes | Creation time in ISO 8601 format. |
| completed_at | string | null | Yes | Completion time in ISO 8601 format; null before completion. |
Poll every few seconds until status is succeeded or failed. Output URLs are provider-hosted and may expire — download them promptly. Or pass callback_url to get the result pushed.
curl "https://01router.com/api/v1/generations/GENERATION_ID" \
-H "Authorization: Bearer $API_KEY"queued → processing → succeeded / failed. Stop polling at either terminal state. Result URLs. Empty while processing; read after succeeded and save the files promptly.
Cancellation depends on provider support and task state. A confirmed cancellation returns status: failed and error: Canceled by user. Unsupported or completed tasks return 409 not_cancelable.
curl -X POST "https://01router.com/api/v1/generations/GENERATION_ID/cancel" \
-H "Authorization: Bearer $API_KEY"Same body as creating a generation. Returns every available provider sorted by price, plus the ones that cannot serve the request and why.
curl "https://01router.com/api/v1/quote" -H "Content-Type: application/json" --data-binary @- <<'JSON'
{
"model": "nano-banana-2",
"input": {
"prompt": "A cinematic shot of a red fox running through snow",
"aspect_ratio": "1:1",
"resolution": "1K",
"num_images": 1
}
}
JSONFor OpenAI SDK integrations, use this endpoint with top-level prompt. It waits for the result and returns data[].url. For asynchronous tasks and the full model parameter set, use /generations.
curl "https://01router.com/api/v1/images/generations" \
-H "Authorization: Bearer $API_KEY" \
-H "Content-Type: application/json" --data-binary @- <<'JSON'
{
"model": "nano-banana-2",
"prompt": "A cinematic shot of a red fox running through snow"
}
JSON{
"created": 1792915200,
"data": [
{
"url": "https://example.com/output.png"
}
]
}This public endpoint returns the model parameters and each provider’s supported constraints and prices.
curl "https://01router.com/api/v1/models/nano-banana-2"Check the HTTP status and error.message. Fix the request before retrying validation or authentication errors. A failed generation is reported in status and error on the task itself.
{
"error": {
"message": "Invalid or missing API key",
"code": "unauthorized"
}
}400Invalid body or parameter value
401Missing or invalid API key
402Not enough credits
404Unknown model or generation
409The task cannot be canceled (already finished, or the provider does not support canceling)
429Too many requests — retry after the given seconds
502Every provider rejected the task (credits refunded)
Give your coding assistant this model reference: endpoints, input constraints, output fields and request examples in plain text.
Specs and starting prices side by side. Test with the same prompt before you choose.
| Nano Banana 2 | Nano Banana 2.1 | Nano Banana Pro | GPT Image 2.5 Flare | |
|---|---|---|---|---|
| Vendor | OpenAI | |||
| Starting price | $0.036 / image | $0.018 / image | $0.081 / image | $0.0053 / image |
| Input | Text · Image | Text · Image | Text · Image | Text · Image |
| Provider | 7 providers | 8 providers | 7 providers | 6 providers |
| Aspect ratio | 1:1 · 16:9 · 9:16 · 4:3 · 3:4 · 3:2 · 2:3 · 4:5 · 5:4 · 21:9 | 1:1 · 16:9 · 9:16 · 4:3 · 3:4 · 3:2 · 2:3 · 4:5 · 5:4 · 21:9 | 1:1 · 16:9 · 9:16 · 4:3 · 3:4 · 3:2 · 2:3 · 4:5 · 5:4 · 21:9 | 1:1 · 4:3 · 3:4 · 16:9 · 9:16 · 3:2 · 2:3 |
| Resolution | 1K · 2K · 4K | 1K · 2K · 4K | 1K · 2K · 4K | — |
| Images | 1 – 4 | 1 – 4 | 1 – 4 | 1 – 4 |
Yes. Nano Banana 2 is the popular name for Google's Gemini 3.1 Flash Image model.
You can pass multiple references in image_urls (up to 14 on most providers) and keep the identity of several people consistent.
1K, 2K and 4K, with ratios from 1:1 to 21:9, including 4:5 and 5:4.
Nano Banana 2.1 is the newer model with better quality and infographic accuracy. Google has announced the retirement of Nano Banana 2 on its developer API, so plan to move new work to 2.1.
Per generated image, priced by resolution and provider; see the pricing table. Failed generations are refunded.
Other models you can call with the same API key.
Google Gemini image model: consistent multi-reference editing, 1K–4K output.
Gemini 3 Pro Image: studio-quality output with reasoning, up to 4K.
OpenAI GPT Image 2.5 Flare: fast everyday generation and editing with precise text rendering.
OpenAI GPT Image 2.5 Sunburst: tighter control for demanding edits and premium creative.
ByteDance Seedream 5.0 Pro: photoreal images, multilingual text and up to 10-reference editing.
Low-latency Seedream 5.0: same price for 1K–2K, up to 10 reference images.