Flux1 AIDevelopers
Flux1 AI API docs
Image generation

Nano Banana 2.1

Google's newest Nano Banana model. Generate and edit images at 1K, 2K or 4K with up to 14 reference images.

GeminiGoogleimage
Model id
nano-banana-2-1
Price
1K 122K 164K 21credits / image
Output
1K–4K
Reference images
Up to 14
Typical time
60–90 seconds

Aspect ratios

auto1:12:33:23:44:34:55:49:1616:921:91:44:11:88:1
Try Nano Banana 2.1 in the web app
POST/api/v1/generations
JSON requestAsynchronousOne image per request

Pricing depends on resolution. Select a tier in the example to see the cost. Reference images do not add an extra charge. Check credits_refunded to confirm a refund; unresolved submissions may require review.

Jump to request examples ↓

Authorization

Authorizationstringrequired

Bearer fx1_live_… — send your API key in the request header. Requires a completed paid purchase; new generations also require enough credits.

Idempotency-Keystringoptional

Use one unique value per generation and reuse it with the same body on retries. Printable ASCII, no spaces. A different body with the same key returns 409.

Maximum length: 128 characters

Manage API keys ↗

Request body

modelstringrequired

Use this exact model ID in the top-level request body.

nano-banana-2-1
promptstringrequired

Describe the image to create, or the changes to make to your reference images. Whitespace is trimmed.

Maximum length: 5,000 characters

imagesstring[]optional

Optional reference images. Use publicly accessible HTTPS URLs or data:image/* base64 URIs (up to 20,000,000 characters per entry). Omit for text-to-image.

Maximum items: 14

aspect_ratiostringoptional

Output width-to-height ratio. Auto lets the model choose.

Default: auto

auto1:12:33:23:44:34:55:49:1616:921:91:44:11:88:1
resolutionstringoptional

Output resolution tier; values are case-insensitive. Omit or leave empty to use the default.

Default: 1K

1K2K4K

Response & next step

A successful submission returns 202 and a generation id. Poll GET /api/v1/generations/{id} every 2–3 seconds until the status is succeeded or failed.

Read the result URL from output.images[0].url. Download it before expires_at (30 days after storage). On failure, inspect error and credits_refunded.

Model notes

  • nano-banana-2-1 is Google's Nano Banana 2.1 (released 2026-10-06), the successor to Nano Banana 2.
  • Choose output size with resolution: 1K (default), 2K or 4K. Reference images do not change the price.
  • aspect_ratio accepts auto, 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9 and the extreme ratios 1:4, 4:1, 1:8, 8:1. With auto and a reference image, the output follows the input's ratio.
  • Expect about 60–90 seconds per image; poll GET /v1/generations/{id} until it finishes.