Models
ImageGoogletext-to-imageimage-edit4k

Nano Banana 2

Gemini 3.1 Flash Image: fast generation and editing with strong text rendering, 1K–4K.

Model ID: nano-banana-2

Last 7 days · not enough recent requests for stats yet.

Playground

1 – 4

Estimated cost—

Use the same request from code — API docs

Provider prices for this request

Enter a prompt to compare provider prices.

Result

Your generation will appear here.

Pricing by provider

Prices are per unit; requests without a provider are routed to the cheapest provider that supports your parameters.

ProviderOptionPrice (USD)Credits
fal.airesolution: 1K$0.082% off$0.078 / image8 / image
resolution: 2K$0.122% off$0.118 / image12 / image
resolution: 4K$0.162% off$0.157 / image16 / image
Replicateresolution: 1K$0.0675% off$0.064 / image7 / image
resolution: 2K$0.1015% off$0.096 / image10 / image
resolution: 4K$0.1515% off$0.143 / image15 / image
WaveSpeedAIresolution: 1K$0.0635% off$0.06 / image6 / image
resolution: 2K$0.0955% off$0.09 / image9 / image
resolution: 4K$0.1265% off$0.12 / image12 / image
KIE AIresolution: 1K$0.0410% off$0.036 / image4 / image
resolution: 2K$0.0610% off$0.054 / image6 / image
resolution: 4K$0.0910% off$0.081 / image9 / image
EvoLinkresolution: 1K$0.0635% off$0.06 / image6 / image
resolution: 2K$0.0945% off$0.089 / image9 / image
resolution: 4K$0.1415% off$0.134 / image14 / image
AtlasCloudresolution: 1K$0.085% off$0.076 / image8 / image
OpenRouterresolution: 1K$0.0672% off$0.066 / image7 / image
resolution: 2K$0.1012% off$0.099 / image10 / image
resolution: 4K$0.1512% off$0.148 / image15 / image

API reference

Endpoints

Base URL: https://01router.com/api/v1

POST/generationsCreate a generation (charges credits)
GET/generations/{id}Get a generation; polls the provider while running
POST/generations/{id}/cancelCancel a running generation (credits refunded)
POST/quotePrice a request on every provider (no charge, no key needed)

Authentication

Send your API key as a Bearer token. Requests are billed to the key owner's credits.

Authorization: Bearer sk_xxxxxxxxxxxxxxxx
Get an API key

Request body

NameTypeRequiredDescription
modelstringYes"nano-banana-2"
providerstringNoPin a provider; omit to auto-route to the cheapest. One of: fal | replicate | wavespeed | kie | evolink | atlascloud | openrouter
inputobjectYesModel parameters, see the input fields below.

input fields

Unified parameters work on every provider; some providers support a narrower range — check the quote endpoint or the playground.

NameTypeValuesDefault
prompt*text——
image_urls
Optional — switches to image editing
images≤ 14—
aspect_ratioenum1:1 | 16:9 | 9:16 | 4:3 | 3:4 | 3:2 | 2:3 | 4:5 | 5:4 | 21:91:1
resolutionenum1K | 2K | 4K1K
num_imagesinteger1 – 41

Example request

curl https://01router.com/api/v1/generations \
  -H "Authorization: Bearer $API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "nano-banana-2",
  "provider": "fal",
  "input": {
    "prompt": "A cinematic shot of a red fox running through snow",
    "aspect_ratio": "1:1",
    "resolution": "1K",
    "num_images": 1
  }
}'

# poll until status is "succeeded" or "failed"
curl https://01router.com/api/v1/generations/<id> -H "Authorization: Bearer $API_KEY"

Response

Pass the model id, its unified input parameters and optionally a provider slug. The response returns immediately with the task id; image models on synchronous providers may already be succeeded.

{
  "id": "gen_6f1c…",
  "object": "generation",
  "model": "nano-banana-2",
  "type": "image",
  "provider": "fal",
  "status": "processing",
  "input": {
    "prompt": "…",
    "aspect_ratio": "1:1",
    "resolution": "1K",
    "num_images": 1
  },
  "outputs": [],
  "error": null,
  "credits": 0,
  "price_usd": 0,
  "created_at": "2026-10-23T08:00:00.000Z",
  "completed_at": null
}

Get the result

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/gen_6f1c… -H "Authorization: Bearer $API_KEY"

{ "id": "gen_6f1c…", "model": "nano-banana-2", "status": "succeeded", "outputs": ["https://…"], … }

Quote

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" \
  -d '{"model":"nano-banana-2","input":{"prompt":"…","aspect_ratio":"1:1","resolution":"1K","num_images":1}}'

Auth, routing, billing and error codes are covered in Gateway API reference