Nano Banana 2.1 Edit API

google/nano-banana-2.1/edit
Coming soon. Nano Banana 2.1 Edit transforms reference images using text instructions, with output resolutions up to 4K and optional video, audio or PDF context. It is the editing endpoint of Google's Nano Banana 2.1.
Output
$0.104 / gen

How to use Nano Banana 2.1 Edit API

Install any OpenAI-compatible SDK, point it at api.aimlapi.com/v1, and set the model to google/nano-banana-2.1/edit.
import requests

r = requests.post(
    "https://api.aimlapi.com/v1/images/generations",
    headers={"Authorization": "Bearer " + AIMLAPI_KEY},
    json={
      "model": "google/nano-banana-2.1/edit",
      "prompt": "Replace the background with a studio backdrop",
      "image_urls": ["https://example.com/photo.jpg"],
      "resolution": "2K"
    },
)
print(r.json())
const r = await fetch("https://api.aimlapi.com/v1/images/generations", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.AIMLAPI_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "model": "google/nano-banana-2.1/edit",
    "prompt": "Replace the background with a studio backdrop",
    "image_urls": ["https://example.com/photo.jpg"],
    "resolution": "2K"
  }),
});
console.log(await r.json());
curl -X POST https://api.aimlapi.com/v1/images/generations \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"google/nano-banana-2.1/edit","prompt":"Replace the background with a studio backdrop","image_urls":["https://example.com/photo.jpg"],"resolution":"2K"}'

OpenAI-compatible — swap the base URL and it works with your existing SDK.

Nano Banana 2.1 Edit API Pricing

TypePrice
Output
$0.104 / gen

Coming soon — not yet available on AI/ML API. Prices are listed ahead of launch and are not billable until the model goes live. 2K output is charged at 1.5x the standard rate, 4K at 2x, and 0.5K at 0.75x.

Nano Banana 2.1 Edit vs other models

ModelInputOutputContextBest for
$0.104 / gen
Image editing
$1.95 / 1M tokens
$0.104 / gen
Image generation
$0.013 / gen
Reference-guided image editing
$6.5 / 1M tokens
$39 / 1M tokens
Fast, high-volume image generation

Frequently asked questions

Nano Banana 2.1 Edit transforms reference images using text instructions, with output resolutions up to 4K. It is the editing endpoint of Google's Nano Banana 2.1.

A text prompt and one or more reference image URLs. Video, audio or PDF context can be supplied as well.

0.5K (512px), 2K and 4K, set through the resolution parameter.

$0.104 per generation at the standard rate, the same as Nano Banana 2.1. 2K output is charged at 1.5x that rate, 4K at 2x, and 0.5K at 0.75x.

Changing an image that already exists: swapping a background, adjusting a detail on an approved asset, or applying an instruction across a set of reference shots.

Start building with Nano Banana 2.1 Edit

Get API Key
1000+ models, one API.