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

Codex · ImageReleased 2026-02-26

How to Use Nano Banana 2 Image Editing in Codex

Nano Banana 2 Image Editing revises supplied images with written instructions, including changes to backgrounds, lighting, and style. Choose it to develop an existing visual; Nano Banana 2 Text to Image focuses on new compositions.

Prompts to try with Nano Banana 2 Image Editing in Codex

Copy an example into Codex, or ask in your own words.

Use Nano Banana 2 Image Editing to revise the existing onboarding illustration in the project. Make the lighting warmer while keeping the composition and character clothing unchanged, then show me the result.

Nano Banana 2 Image EditingCodex
Try asking
  • Use Nano Banana 2 Image Editing to revise our existing event poster with the approved title and date from the project. Keep the lettering large and show the output for a spelling check.

  • Remove the background from the photo I attach with Nano Banana 2 Image Editing and give me a transparent PNG. Save the result in ./assets.

  • Use Nano Banana 2 Image Editing to clean up these product shots so they sit on pure white.

  • Edit this image with Nano Banana 2 Image Editing: keep the subject, swap the background for a sunlit studio.

How to set up Nano Banana 2 Image Editing in Codex

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

Use Spiral's MCP server

  1. Add the hosted server
    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.

    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.

    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 Image Editing

    One request; the result comes back by polling or a webhook.

    curl https://api.spiral.ai/v1/runs \
      -H "Authorization: Bearer $SPIRAL_API_KEY" \
      -H "Content-Type: application/json" \
      -H "Idempotency-Key: $(uuidgen)" \
      -d '{
        "provider": "fal",
        "model": "fal-ai/gemini-3.1-flash-image-preview/edit",
        "input": {
          "prompt": "make a photo of the man driving the car down the california coastline",
          "image_urls": [
            "<image_urls>"
          ]
        }
      }'

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

Nano Banana 2 Image Editing providers and prices

Spiral runs Nano Banana 2 Image Editing through fal. Open a card for today's price, with every fee included.

falImage
Gemini 3.1 Flash Image Preview · Image Editing
fal-ai/gemini-3.1-flash-image-preview/edit

Settings you can ask for

Nano Banana 2 Image Editing works from your prompt, image URLs, system prompt, video URL, audio URL, and PDF URL. Ask Codex for any of these in your prompt.

SettingAllowed valuesDefaultDescription
Return historyon or offoff

Return reusable native conversations with original image parts and provider thought signatures. Uses a native provider. Each generated conversation is independent; send its messages as history for the next turn.

Thinking levelminimal or high

Controls thinking effort ('minimal' or 'high') and requests thought summaries. Omit to use the provider default ('minimal'); thinking cannot be disabled.

Image passthroughon or offoff

Send reference images and return provider images without resizing or re-encoding, preserving transparency and metadata. Uses direct Google or Vertex APIs; the returned image format may differ from output_format.

Include thoughtson or off

Whether to include thought summaries. Omit to preserve the existing behavior: an explicit thinking_level requests summaries. Set limit_generations=false to return summary text in description. This does not disable thinking or return intermediate thought images.

Temperature0 to 2

Sampling temperature. Omit to use the provider default of 1. Explicit values use a direct Google or Vertex API.

Top p0 to 1

Nucleus sampling probability. Omit to use the provider default of 0.95. Explicit values use a direct Google or Vertex API.

Max output tokens1 to 32768

Maximum output tokens for the generation. Omit to retain the provider default. Explicit values use a direct Google or Vertex API.

Number of images1 to 41

The number of images to generate.

Seeda whole number

The seed for the random number generator.

Aspect ratioauto, 21:9, 16:9, 3:2, 4:3, 5:4, 1:1, 4:5 and 7 moreauto

The aspect ratio of the generated image. Supports extreme ratios: 4:1, 1:4, 8:1, 1:8.

Output formatjpeg, png, or webppng

The format of the generated image.

Safety tolerance1 to 64

The safety tolerance level for content moderation. 1 is the most strict (blocks most content), 6 is the least strict.

Resolution0.5K, 1K, 2K, or 4K1K

The resolution of the image to generate.

Limit generationson or offon

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.

Enable web searchon or offoff

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.

Enable image searchon or offoff

Ground image generation with Google Image Search. Can be combined with enable_web_search; source attribution is returned in grounding_metadata. Uses direct Google or Vertex APIs.

Every API field of Gemini 3.1 Flash Image Preview · Image Editing is on its tool page: open its card above.

What can you do with Nano Banana 2 Image Editing 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.

Questions about Nano Banana 2 Image Editing in Codex

Can Codex use Nano Banana 2 Image Editing?

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

How much does Nano Banana 2 Image Editing cost in Codex?

`resolution`: 0.5K $0.078, 1K (default) $0.104, 2K $0.156, 4K $0.208 per image. Billed on `num_images`, default 1. 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 fal account to use Nano Banana 2 Image Editing in Codex?

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

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

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

Does Codex wait while Nano Banana 2 Image Editing runs?

Nano Banana 2 Image Editing 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.

Get started

Start using Nano Banana 2 Image Editing in Codex

One Spiral account for every tool your agent needs. No subscription; you pay per run.

Paste this into Codex:

Set up Codex

set up https://spiral.ai/SKILL.md
Are you an AI agent? See setup options