Nano Banana 2.1 API for Text-to-Image up to 4K

Send a prompt to POST /api/v1/images/generations with model: nano-banana-2-1 to generate one image with Google's newer Nano Banana model. Choose from 15 aspect ratios and 1k, 2k or 4k output, optionally ground the prompt with web search, then collect the result by img_uuid through polling or a callback.
Get API Key
Sunlit design studio desk with a large printed poster of a crisp illustrated landscape

Prompt In, One Image Out

Fifteen aspect ratios, from banner to scroll

Set ratio to auto (default, the model picks framing from the prompt) or to any of 1:1, 16:9, 9:16, 4:3, 3:4, 2:3, 3:2, 4:5, 5:4, 21:9, and the extreme 1:4, 4:1, 1:8, 8:1 strips.
Row of picture frames in very different proportions hanging on a gallery wall

Web grounding and thinking control

Set web_search: true to ground the prompt with web search. thinking_level accepts High or Minimal; omit it to use the model's default (medium). Thinking cannot be turned off, and it is included in the price.
Reading desk with an open atlas, reference books and a magnifying glass under lamp light

1K, 2K or 4K output

image_size defaults to 1k; 2k and 4k are available, 0.5k is not. The submit call returns img_uuid and the charged cost.
Large-format printer producing a highly detailed botanical print
Only model and prompt are required; everything else has a documented default.

Nano Banana 2.1 Request Fields and Limits

model

Always nano-banana-2-1. For editing with reference images use nano-banana-2-1-edit.

prompt (required)

Text describing the image, 1 to 2000 characters.

ratio

auto (default), 1:1, 16:9, 9:16, 4:3, 3:4, 2:3, 3:2, 4:5, 5:4, 21:9, 1:4, 4:1, 1:8 or 8:1.

image_size

1k (default), 2k or 4k. 0.5k is not available on this model.

web_search and thinking_level

web_search is a boolean that enables web search grounding. thinking_level is High or Minimal; omit it for the default medium level.

custom_callback_url

Optional public HTTPS URL. GoEnhance POSTs the job-detail body on each status change, retrying up to 3 times with a 3-second timeout per attempt.
One price per generated image, set by image_size. Thinking is included.

Nano Banana 2.1 API Pricing

1k: 2.92 tokens ($0.0584) per image

The default size. ratio, web_search and thinking_level do not change the price.

2k: 4.02 tokens ($0.0804) per image

Double the default resolution tier for print and large displays.

4k: 8.08 tokens ($0.1616) per image

The largest output this model offers.

Charged on acceptance, refunded on failure

Tokens are deducted when the task is accepted and returned automatically if the job fails. The cost field shows the amount actually charged, which already reflects any account discount.

Integrate the Nano Banana 2.1 API

1

1. Create an API key

Generate a key at /keys and send it as Authorization: Bearer <key> from your server.
2

2. Submit the prompt

POST {"model": "nano-banana-2-1", "prompt": "…", "image_size": "2k", "ratio": "16:9"} to /api/v1/images/generations.
3

3. Track the job

Store the returned img_uuid, then poll GET /api/v1/jobs/detail or wait for your custom_callback_url to be called.
4

4. Save the image

When status is success, read the type: image entry in json and download it before link_expired_at, 24 hours after the job finished.
Create an API Key
Prompt-driven image features where layout, text and resolution matter.

What Developers Build with Nano Banana 2.1

Posters and graphics with text

Generate headline visuals, event posters and social cards, where the model's improved text rendering matters.

Banners in unusual formats

Fill wide 4:1 or 8:1 web banners and tall 1:4 or 1:8 mobile strips without cropping a square image.

Timely or factual scenes

Turn on web_search when a prompt refers to real places, products or current topics that benefit from grounding.

Print-ready artwork

Request 4k output for wall art, packaging mockups and large-format prints.
Endpoint, options, pricing and results.

Nano Banana 2.1 API FAQ

What is the Nano Banana 2.1 API endpoint?

POST https://api.goenhance.ai/api/v1/images/generations with model: nano-banana-2-1.

Can I pass reference images?

Not on this model; it is text-to-image only. Use nano-banana-2-1-edit with 1 to 9 images in image_list for editing and composition, at the same per-image price.

How much does it cost?

2.92 tokens ($0.0584) at 1k, 4.02 tokens ($0.0804) at 2k and 8.08 tokens ($0.1616) at 4k, per image.

Can I turn thinking off?

No. You can set thinking_level to Minimal or High, or omit it for the default medium level. Thinking is included in the price.

Is this Google's official API?

No. GoEnhance provides independent API access to the model through its own endpoint, keys and billing; it is not Google's developer API.

How do I get the finished image?

Poll GET /api/v1/jobs/detail?img_uuid=… or use custom_callback_url. Result links expire 24 hours after the job finishes, so download them promptly.

Start Building with the Nano Banana 2.1 API