# Nano Banana 2 Edit (`nano_banana_2/edit`)

> Google Gemini 2 Flash image editing. Reference-based generation.

- Capability: Images (tool `image`) — Image to image
- Price: from $0.06 per run (1 credit = $0.01). Exact price for a request: POST https://api.varg.ai/v2/estimate
- Typical time: ~15 s
- JSON Schema: https://api.varg.ai/v2/tools/image?model=nano_banana_2%2Fedit (public, no key)
- Try it: https://varg.ai/dashboard/tools/playground?model=nano_banana_2%2Fedit

## Call it

REST: `POST https://api.varg.ai/v2/tools/image/call` with `Authorization: Bearer $VARG_API_KEY` (create a key at https://varg.ai/dashboard/api).
It answers `202` with a job right away. Poll `GET /v2/jobs/{id}` until `status` is `completed`, then read `output.outputs[0].url` — or pass `options.webhook_url` and get the finished job POSTed to you.

```bash
curl -X POST https://api.varg.ai/v2/tools/image/call \
  -H "Authorization: Bearer $VARG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "nano_banana_2/edit",
  "prompt": "exact same man from reference image — muscular male calisthenics coach, same face, same dark tank top, same necklace, same hairstyle, same skin texture, same age, same gym background with equipment visible, same warm dramatic lighting from above-left, same UGC vertical framing, centered in frame looking directly into camera, serious but welcoming expression, calm focused eyes, slight natural ready-to-speak stance, photorealistic, no smile, no overacting, no beauty filter, no subtitles. Maintain exact facial identity from reference. No face changes.",
  "files": [
    {
      "url": "https://s3.varg.ai/files/667690f1-5d8e-48e0-95ed-4ece08ad7202/file_5aed78f5ac31.png"
    }
  ],
  "aspect_ratio": "9:16"
}'
```

MCP: the varg server `https://mcp.varg.ai/mcp` (OAuth sign-in, no key) runs it with `call_tool`:

```json
{
  "tool": "image",
  "input": {
    "model": "nano_banana_2/edit",
    "prompt": "exact same man from reference image — muscular male calisthenics coach, same face, same dark tank top, same necklace, same hairstyle, same skin texture, same age, same gym background with equipment visible, same warm dramatic lighting from above-left, same UGC vertical framing, centered in frame looking directly into camera, serious but welcoming expression, calm focused eyes, slight natural ready-to-speak stance, photorealistic, no smile, no overacting, no beauty filter, no subtitles. Maintain exact facial identity from reference. No face changes.",
    "files": [
      {
        "url": "https://s3.varg.ai/files/667690f1-5d8e-48e0-95ed-4ece08ad7202/file_5aed78f5ac31.png"
      }
    ],
    "aspect_ratio": "9:16"
  },
  "wait": true
}
```

## Inputs

| field | type | required | default | allowed | description |
|---|---|---|---|---|---|
| `model` | string | yes | — | `nano_banana_2/edit` or a route key below | Which model runs the job. |
| `prompt` | string | no | — | — | — |
| `files` | array of { url } | no | — | — | — |
| `aspect_ratio` | string | no | — | e.g. 16:9 \| 9:16 \| 1:1 \| 4:3 \| 3:4 \| 21:9 \| auto | — |

Media inputs are URLs. Upload a local file first with `POST /v2/files` and pass the returned URL.

## Provider options

Optional, per provider, under `provider_options.<provider>`. Only the options of the provider that runs the job apply — pin a route to choose it.

### provider_options.fal

| field | type | required | default | allowed | description |
|---|---|---|---|---|---|
| `prompt` | string | no | — | — | The prompt for image editing. |
| `system_prompt` | string | no | — | — | Optional system instruction that steers the model's persona and output style across the request. Leave blank to omit; when provided, it is sent as the system instruction to Gemini (or as a system message on OpenAI-compatible providers). |
| `image_urls` | array of URL strings | no | — | — | — |
| `seed` | integer | no | — | -9007199254740991–9007199254740991 | — |
| `pdf_url` | string (URL) | no | — | — | — |
| `audio_url` | string (URL) | no | — | — | — |
| `sync_mode` | boolean | no | — | — | If `True`, the media will be returned as a data URI and the output data won't be available in the request history. |
| `video_url` | string (URL) | no | — | — | — |
| `num_images` | integer | no | — | 1–4 | The number of images to generate. |
| `resolution` | string | no | — | 0.5K \| 1K \| 2K \| 4K | — |
| `aspect_ratio` | string | no | — | auto \| 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 | — |
| `output_format` | string | no | — | jpeg \| png \| webp | — |
| `thinking_level` | string | no | — | minimal \| high | — |
| `safety_tolerance` | string | no | — | 1 \| 2 \| 3 \| 4 \| 5 \| 6 | — |
| `enable_web_search` | boolean | no | — | — | Enable web search for the image generation task. This will allow the model to use the latest information from the web to generate the image. |
| `limit_generations` | boolean | no | — | — | Experimental parameter to limit the number of generations from each round of prompting to 1. Set to `True` to to disregard any instructions in the prompt regarding the number of images to generate and ignore any intermediate images generated by the model. This may affect generation quality. |

## Routes

`"model": "nano_banana_2/edit"` picks a route automatically (priority order, then the inputs you send). To pin one, pass its key as `model`.

| model key | provider | modality | price from | typical time |
|---|---|---|---|---|
| `fal:nano_banana_2/edit` | fal | image-to-image | $0.06 | ~15 s |

## Example output

- image/png: https://s3.varg.ai/files/667690f1-5d8e-48e0-95ed-4ece08ad7202/file_580c0a13cf29.png

---

Catalog version 2026-11-11T12:59:09.901887+00:00. All models: https://varg.ai/models/llms.txt
