Spiral gives your agent every tool with one account. Browse the tools →

GeminiImageAvailable nowReleased 2026-05-28

Nano Banana 2

gemini-3.1-flash-image

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

Run time p50 · last 24 hours
30.6s
Success rate · last 24 hours
34.4%

Pricing

$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.

Limits

Runs
In the background
Returns
image
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

FieldKindDefaultDescription
contents requiredJSON—

The content of the current conversation with the model.

toolsJSON—

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.

generationConfigJSON—

Configuration options for model generation and outputs.

systemInstructionJSON—

Developer set system instruction(s).

Same request in code

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": [
        {}
      ]
    }
  }'

Frequently asked questions

How much does Nano Banana 2 cost?

$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 as you go from one Spiral balance, with no subscription, and a failed run is not charged.

How do I use Nano Banana 2 through an API?

Send `POST /v1/runs` with `"provider": "gemini"`, `"model": "gemini-3.1-flash-image"` and the input fields on this page, using one Spiral API key. It runs in the background: poll the run, or name a webhook to be told when it finishes.

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

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

Can my AI agent use Nano Banana 2?

Yes. Agents find and run it through Spiral's MCP server, CLI or agent skill, with the same API key.