[Integrations](https://spiral.ai/integrations) › [Codex](https://spiral.ai/integrations/codex) › [Nano Banana 2](https://spiral.ai/integrations/codex/nano-banana-2)

# How to Use Nano Banana 2 in Codex

Nano Banana 2 creates images and revises existing artwork through conversation. It covers both tasks in one model, while Nano Banana 2 Text to Image and Nano Banana 2 Image Editing organize them separately.

|  |  |
| --- | --- |
| Model | Nano Banana 2 |
| Available through | Gemini, Vertex AI |
| Category | Image |
| Price | $0.0874 per 1K image ($0.0583 at 0.5K, $0.131 at 2K, $0.197 at 4K). Prompt: $0.65 per 1M tokens. Reasoning: $3.90 per 1M tokens. Google Search: $0.0182 per query. |
| Returns | image |
| Runs | In the background |
| Setup | About 2 minutes, no API key |

## Prompts to try with Nano Banana 2 in Codex

- Use Nano Banana 2 to create a square 2K diagram explaining the three main stages documented in our architecture notes. Use short labels and flag any label that needs review.
- Generate a product photo with Nano Banana 2: a matte black water bottle on wet slate, soft morning light, 1:1. Tell me the price first. Save the result in ./assets.
- Make four logo concepts for a coffee brand called "Northline" with Nano Banana 2.
- Create a 16:9 hero image of a quiet mountain cabin at dusk with Nano Banana 2.
- Generate a 9:16 poster with Nano Banana 2 for a jazz night called "Blue Hour", deep navy and brass tones.

## How to set up Nano Banana 2 in Codex

Pick the way that suits you. Each takes about two minutes.

### Use Spiral's MCP server

1. **Add the hosted server**

```bash
codex mcp add spiral --url https://api.spiral.ai/mcp
```

2. **Sign in**: Codex opens the browser: sign in to Spiral and click Authorize. No API key. `codex mcp list` then shows Spiral.

```bash
codex mcp login spiral
```

### Use the Spiral skill

1. **Send Codex 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.

### 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
```

### Call the Spiral API

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

2. **Run Nano Banana 2**: 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-3.1-flash-image",
    "input": {
      "contents": [
        {}
      ]
    }
  }'
```

Then paste one of the prompts above: Codex finds Nano Banana 2 on Spiral, shows the price and runs it.

Setup guide in the docs: https://spiral.ai/docs/quickstarts/codex

## Nano Banana 2 tools and prices

- [Nano Banana 2](https://spiral.ai/tools/gemini/gemini-3.1-flash-image) (Gemini): $0.0874 per 1K image ($0.0583 at 0.5K, $0.131 at 2K, $0.197 at 4K). Prompt: $0.65 per 1M tokens. Reasoning: $3.90 per 1M tokens. Google Search: $0.0182 per query.
- [Nano Banana 2](https://spiral.ai/tools/vertex/gemini-3.1-flash-image) (Vertex AI): $0.0874 per 1K image ($0.0583 at 0.5K, $0.131 at 2K, $0.197 at 4K). Prompt: $0.65 per 1M tokens ($0.065 cached). Reasoning: $3.90 per 1M tokens. Google Search: $0.0182 per query.

## Settings you can ask for

| Setting | Allowed values | Default | Description |
| --- | --- | --- | --- |
| tools |  | — | 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 |  | — | Configuration options for model generation and outputs. |
| systemInstruction |  | — | Developer set [system instruction(s)](https://ai.google.dev/gemini-api/docs/system-instructions). |

## What can you do with Nano Banana 2 in Codex?

Create illustrations and explanatory graphics for your project with Nano Banana 2. A coding agent can turn project notes into visual drafts and help review the results before adding them to the interface.

### Social campaign artwork

Develop a campaign image from a written brief or revise a supplied draft. Specify the placement, subject, and short headline before working on alternate compositions.

### Educational diagrams

Turn lesson notes into a labeled illustration, or improve an existing diagram. Keep labels brief and check the relationships between illustrated elements.

### Event poster drafts

Create a poster concept or revise supplied artwork around an approved title and date. Keep detailed event information outside the generated image if it requires small lettering.

### Presentation infographics

Build a visual explanation from verified notes or revise an existing slide graphic. Use a few clear labels instead of embedding paragraphs.

### Localized promotional artwork

Start with an existing promotional image and replace its text with approved translated copy. Review wording, line breaks, and retained design details.

### Background revisions

Revise the setting around a supplied subject to explore a different scene. Inspect the subject afterward for unintended changes.

### Illustration style studies

Use a supplied image as the starting point for a different illustration treatment. Compare the results before choosing a direction.

### Lighting revisions

Adjust the lighting in an existing image through a focused editing request. Change one aspect at a time so the result is easier to evaluate.

## Overview

- [Google Gemini](https://spiral.ai/providers/gemini)
- [All Codex guides](https://spiral.ai/integrations/codex)

## Nano Banana 2 in other agents

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

## More Codex guides

- [Nano Banana](https://spiral.ai/integrations/codex/nano-banana)
- [Nano Banana 2 Image Editing](https://spiral.ai/integrations/codex/nano-banana-2-image-editing)
- [NAFNet Denoise](https://spiral.ai/integrations/codex/nafnet-denoise)
- [Nano Banana 2 Image Editing fal](https://spiral.ai/integrations/codex/nano-banana-2-image-editing-fal)
- [NAFNet Deblur](https://spiral.ai/integrations/codex/nafnet-deblur)
- [Nano Banana 2 Lite](https://spiral.ai/integrations/codex/nano-banana-2-lite)

## Questions about Nano Banana 2 in Codex

**Can Codex use Nano Banana 2?**

Yes. Add Spiral to Codex as an MCP server, and Codex can find and run Nano Banana 2 like any built-in tool.

**How much does Nano Banana 2 cost in Codex?**

$0.0874 per 1K image ($0.0583 at 0.5K, $0.131 at 2K, $0.197 at 4K). Prompt: $0.65 per 1M tokens. Reasoning: $3.90 per 1M tokens. Google Search: $0.0182 per query. You pay from your Spiral balance as you go, with no subscription, and a failed run is not charged. Your Codex plan is separate.

**Do I need a Gemini account to use Nano Banana 2 in Codex?**

No. Spiral runs Nano Banana 2 on its own Gemini account. You sign in to Spiral once and never paste a key.

**How long does it take to set up Nano Banana 2 in Codex?**

About two minutes: add the hosted server, then sign in.

**Which provider runs Nano Banana 2?**

Spiral offers Nano Banana 2 through Gemini and Vertex AI. Name one in your prompt, or let Codex pick.

**Does Codex wait while Nano Banana 2 runs?**

Nano Banana 2 runs in the background. Codex starts the run, checks on it and gives you the image when it's ready.

**What is Nano Banana 2 useful for?**

Use it for visual drafts that combine illustrations and short labels, such as posters, educational diagrams, and infographics. It also supports conversational revisions, so you can develop a design through specific follow-up requests.

**How large can Nano Banana 2 images be?**

Nano Banana 2 supports output from 0.5K through 4K, with 1K as the default. Choose the composition as well as the resolution: square, portrait, landscape, and panoramic formats serve different placements.

**Can Nano Banana 2 handle text inside images?**

It can produce and translate text within artwork, but small lettering and long paragraphs remain weaknesses. Keep image copy short and check the spelling before using the result.

**Will Nano Banana 2 preserve a character exactly?**

Character consistency is imperfect. Compare the face, clothing, and distinguishing details after each revision before accepting a sequence of images.

**Can Nano Banana 2 localize artwork?**

Yes, it can translate and localize text within an image. Give it the intended audience and approved wording, then review the translated artwork before publication.

