# Nano Banana 2.1

Generate and edit images with Nano Banana 2.1 from Gemini through one Spiral API key. Generates or edits images from text and image inputs with Google's Nano Banana 2.1, with optional Google web and image search. It runs in the background and returns images. Pay as you go, with no subscription.

- Provider: Gemini
- Category: Image
- Runs: In the background
- Returns: image
- Released: 2026-10-06
- Tool id: `gemini` / `gemini-nano-banana-2.1`
- Model: `google/gemini-nano-banana-2.1` (the same on every tool of this model)
- Page: https://spiral.ai/tools/gemini/gemini-nano-banana-2.1

## Pricing

$0.0437 per 1K image ($0.0655 at 2K, $0.147 at 4K). Prompt: $1.95 per 1M tokens. Reasoning: $9.75 per 1M tokens. Google Search: $0.0182 per query.

## Limits

- Longest queue wait: 1 hour
- Run deadline: 30 minutes
- Longest run, end to end: 225 minutes
- Largest inline input: 1 MB
- Largest input file: 2 GB
- Largest output: 5 GB

## Input

| Field | Kind | Allowed | Default | Description |
| --- | --- | --- | --- | --- |
| `contents` (required) | JSON |  | — | The content of the current conversation with the model. |
| `tools` | JSON |  | — | Grounding with Google Search, the only tool this model takes (web and image search). Set generationConfig.responseModalities to ["TEXT", "IMAGE"]. Every search query the model runs is billed. |
| `generationConfig` | JSON |  | — | Configuration options for model generation and outputs. |
| `systemInstruction` | JSON |  | — | Developer set [system instruction(s)](https://ai.google.dev/gemini-api/docs/system-instructions). |

## How to use Nano Banana 2.1

From your AI agent, the command line or your own code. One Spiral account runs it every way.

### Use Spiral's MCP server

1. **Add Spiral's MCP server**: Any MCP client takes https://api.spiral.ai/mcp with your API key as a Bearer token. In Claude Code:

```bash
claude mcp add spiral --transport http https://api.spiral.ai/mcp \
  --header "Authorization: Bearer $SPIRAL_API_KEY"
```

2. **Ask for Nano Banana 2.1**: Your agent finds it on Spiral, shows the price and runs it.

```
Use Nano Banana 2.1 from Gemini on Spiral.
```

### Use the Spiral skill

1. **Send your agent this message**: Your agent reads Spiral's skill and sets itself up.

```
set up https://spiral.ai/SKILL.md
```

2. **Sign in or paste a key**: Approve Spiral in the browser, or give the agent a key from the console.

3. **Ask for Nano Banana 2.1**: Your agent finds it on Spiral, shows the price and runs it.

```
Use Nano Banana 2.1 from Gemini on Spiral.
```

### Use the Spiral CLI

1. **Install and sign in**: Installs the Spiral CLI, signs you in and adds its skill to your coding agents.

```bash
npx -y spiral-cli@latest init
```

2. **Run Nano Banana 2.1**: Waits for the result and saves the run and its files under .spiral/runs.

```bash
spiral runs create \
  --provider gemini \
  --model gemini-nano-banana-2.1 \
  --input '{
    "contents": [
      {}
    ]
  }' \
  --wait --save
```

### Call the Spiral API

1. **Create an API key**: In the console, under API keys.

2. **Run Nano Banana 2.1**: One request; the result comes back by polling or a webhook.

```bash
curl https://api.spiral.ai/v1/runs \
  -H "Authorization: Bearer $SPIRAL_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "provider": "gemini",
    "model": "gemini-nano-banana-2.1",
    "input": {
      "contents": [
        {}
      ]
    }
  }'
```

Try it in the Playground: https://spiral.ai/start?provider=gemini&model=gemini-nano-banana-2.1

## Use Nano Banana 2.1 in your AI agent

- [Amp](https://spiral.ai/integrations/amp/nano-banana-2-1)
- [ChatGPT](https://spiral.ai/integrations/chatgpt/nano-banana-2-1)
- [Claude](https://spiral.ai/integrations/claude-desktop/nano-banana-2-1)
- [Claude Code](https://spiral.ai/integrations/claude-code/nano-banana-2-1)
- [Cline](https://spiral.ai/integrations/cline/nano-banana-2-1)
- [Codex](https://spiral.ai/integrations/codex/nano-banana-2-1)
- [Cursor](https://spiral.ai/integrations/cursor/nano-banana-2-1)
- [Devin](https://spiral.ai/integrations/devin/nano-banana-2-1)
- [dots](https://spiral.ai/integrations/dots/nano-banana-2-1)
- [Factory Droid](https://spiral.ai/integrations/factory-droid/nano-banana-2-1)
- [Gemini](https://spiral.ai/integrations/gemini/nano-banana-2-1)
- [Gemini CLI](https://spiral.ai/integrations/gemini-cli/nano-banana-2-1)
- [Google Antigravity](https://spiral.ai/integrations/antigravity/nano-banana-2-1)
- [goose](https://spiral.ai/integrations/goose/nano-banana-2-1)
- [Grok](https://spiral.ai/integrations/grok/nano-banana-2-1)
- [Grok Build](https://spiral.ai/integrations/grok-build/nano-banana-2-1)
- [Hermes](https://spiral.ai/integrations/hermes/nano-banana-2-1)
- [Instinct](https://spiral.ai/integrations/instinct/nano-banana-2-1)
- [Manus](https://spiral.ai/integrations/manus/nano-banana-2-1)
- [Muse](https://spiral.ai/integrations/muse/nano-banana-2-1)
- [Muse Code](https://spiral.ai/integrations/muse-code/nano-banana-2-1)
- [n8n](https://spiral.ai/integrations/n8n/nano-banana-2-1)
- [Notion](https://spiral.ai/integrations/notion/nano-banana-2-1)
- [OpenClaw](https://spiral.ai/integrations/openclaw/nano-banana-2-1)
- [opencode](https://spiral.ai/integrations/opencode/nano-banana-2-1)
- [Perplexity](https://spiral.ai/integrations/perplexity/nano-banana-2-1)
- [Raycast](https://spiral.ai/integrations/raycast/nano-banana-2-1)
- [VS Code](https://spiral.ai/integrations/vscode/nano-banana-2-1)
- [Windsurf](https://spiral.ai/integrations/windsurf/nano-banana-2-1)
- [Zapier](https://spiral.ai/integrations/zapier/nano-banana-2-1)

## Provider

- [Google Gemini](https://spiral.ai/providers/gemini)

## Related tools

- [Nano Banana 2 Lite](https://spiral.ai/tools/gemini/gemini-3.1-flash-lite-image)
- [GPT Image 2 · Text to Image](https://spiral.ai/tools/openai/gpt-image-2)
- [Nano Banana 2](https://spiral.ai/tools/gemini/gemini-3.1-flash-image)
- [GPT Image 2.5 Flare · Text to Image](https://spiral.ai/tools/openai/gpt-image-2.5-flare)
- [Nano Banana Pro](https://spiral.ai/tools/gemini/gemini-3-pro-image)
- [GPT Image 2.5 Flare · Edit](https://spiral.ai/tools/openai/gpt-image-2.5-flare/edit)

## Common questions

### Nano Banana 2.1

**How much does Nano Banana 2.1 cost?**

$0.0437 per 1K image ($0.0655 at 2K, $0.147 at 4K). Prompt: $1.95 per 1M tokens. Reasoning: $9.75 per 1M tokens. Google Search: $0.0182 per query. It is paid from your prepaid Spiral balance as you use it, with no subscription.

**How long does Nano Banana 2.1 take to run?**

It runs in the background: the request returns a run id at once, and you poll `GET /v1/runs/{id}` or name a webhook to hear when it finishes. A run can take at most 225 minutes, end to end.

**What input does Nano Banana 2.1 take?**

It needs `contents`. It also takes 3 optional fields: `tools`, `generationConfig` and `systemInstruction`. Each field's type, allowed values and default are listed on this page.

**What does Nano Banana 2.1 return?**

A finished run returns image output. Each output up to 5 GB is stored as a copy; a larger output comes back as the provider's own link where the provider gives one, and otherwise that output is not delivered and you are not charged for it; a run with nothing delivered fails as too large, without a charge.

**What are the limits of Nano Banana 2.1?**

Longest queue wait: 1 hour; largest inline input: 1 MB; largest input file: 2 GB.

**How do I use Nano Banana 2.1 through an API?**

Send `POST /v1/runs` with `"provider": "gemini"`, `"model": "gemini-nano-banana-2.1"` and its input, using one Spiral API key.

**How do I see what a run of Nano Banana 2.1 will cost before I start it?**

Send the same request to `POST /v1/estimate`: it prices that exact input without running it.

**What happens if a run of Nano Banana 2.1 fails?**

Only for work the provider billed. A run that fails before the provider does billable work is not charged, and its hold goes back to your balance; a failure the provider bills for is charged for the work the provider billed, at the tool's price. Each failed run's error says why it failed and what it was charged.

**Do I need an account with Gemini to use Nano Banana 2.1?**

No. Spiral runs it on its own Gemini account and charges your Spiral balance.

**Can my AI agent use Nano Banana 2.1?**

Yes. Any agent connected to Spiral's MCP server, CLI or agent skill runs it with the same API key, and there are guides for using it from Amp, ChatGPT, Claude, Claude Code, Cline, Codex, Cursor, Devin, dots, Factory Droid, Gemini, Gemini CLI, Google Antigravity, goose, Grok, Grok Build, Hermes, Instinct, Manus, Muse, Muse Code, n8n, Notion, OpenClaw, opencode, Perplexity, Raycast, VS Code, Windsurf and Zapier.

**Can I cap what an agent spends on Nano Banana 2.1?**

Yes. Give each agent its own API key with a spend cap: a run whose estimate would pass the cap is refused before it starts.

