# Google Nano Banana 2 Edit API

> Nano Banana 2 is Google's new state-of-the-art image generation and editing model

Source: https://www.sandbase.ai/model/google/nano-banana-2/edit
API reference: https://www.sandbase.ai/model/google/nano-banana-2/edit/docs

## Facts

- Provider: Google
- Type: Image model
- Model ID: `google/nano-banana-2/edit`
- Price: From $0.06 per run (15% off list price)
- Capabilities: image to image, commercial
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

- Unified Run API: `POST https://api.sandbase.ai/v1/run`

```bash
curl -X POST https://api.sandbase.ai/v1/run \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "google/nano-banana-2/edit",
  "images": [
    "https://ai.google.dev/static/gemini-api/docs/images/man_in_white_glasses.jpg"
  ],
  "prompt": "Make a 3 panel comic in a gritty, noir art style with high-contrast black and white inks. Put the character in a humurous scene.",
  "resolution": "1K",
  "output_format": "png",
  "enable_web_search": false,
  "enable_image_search": false
}'
```

The response returns a run id; poll `GET https://api.sandbase.ai/v1/run/{id}` until the status is `completed` or `failed`.

## FAQ

### How do I call Google Nano Banana 2 Edit through SandBase?

Create a SandBase API key, then send requests with the model ID "google/nano-banana-2/edit" to Unified Run API (/v1/run) at https://api.sandbase.ai. The request examples on this page show the exact payload.

### Do I need a separate Google account?

No. One SandBase API key and balance gives you access to Google Nano Banana 2 Edit and the other models in the catalog; you do not need to sign up with Google separately.

## README

### Nano Banana 2 Edit

Edit or combine images with Nano Banana 2, Google's fast image model. Send images with an instruction to restyle, retouch, swap objects, or merge several inputs into one scene.

#### Fields

| Field | Type | Default | Notes |
|---|---|---|---|
| `images` | image URL[], required | — | Images to edit or combine, Image 1, Image 2, … |
| `prompt` | string, required | — | Up to 50,000 characters. |
| `aspect_ratio` | `21:9` / `16:9` / `3:2` / `4:3` / `5:4` / `1:1` / `4:5` / `3:4` / `2:3` / `9:16` / `4:1` / `1:4` / `8:1` / `1:8` | — | Omit to follow the first input image. |
| `output_format` | `jpeg` / `png` | `png` | Output file format. |
| `resolution` | `0.5K` / `1K` / `2K` / `4K` | `1K` | Sets the per-image rate. |
| `enable_web_search` | boolean | false | Ground the edit in Google Search results. |
| `enable_image_search` | boolean | false | Use image search results as visual references. |

#### Billing

$0.045 at 0.5K, $0.067 at 1K, $0.101 at 2K, and $0.151 at 4K per image, Google's list price. Input images are not metered. Turning on `enable_web_search` or `enable_image_search` adds $0.014 per request (charged once even if both are on).

| Request | 0.5K | 1K | 2K | 4K |
|---|---|---|---|---|
| One image | $0.045 | $0.067 | $0.101 | $0.151 |

Failed runs are not charged.

#### Prompting

- Say which image is the base and what each other image contributes.
- List what must not change.

#### Limits

- One output image per request.

#### Also on SandBase

Other Nano Banana endpoints: `google/nano-banana-pro`, `google/nano-banana-pro/edit`, `google/nano-banana-2`, `google/nano-banana-2-lite`, `google/nano-banana-2-lite/edit`.
