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

opencode · ImageReleased 2025-11-20

How to Use Nano Banana Pro Edit in opencode

Use Nano Banana Pro Edit to revise product photos, translate artwork, or turn sketches into mockups. Unlike Nano Banana Pro Text to Image, its main job starts with an existing visual.

Prompts to try with Nano Banana Pro Edit in opencode

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

Use Nano Banana Pro Edit to revise public/images/product.png. Place the product on a wood desk beside a window with soft morning light; use the original image as the product reference.

Nano Banana Pro Editopencode
Try asking
  • Use Nano Banana Pro Edit to replace the English headline in assets/poster.png with the approved Spanish headline in locales/es.json. Request 2K output and inspect the lettering against the source text.

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

  • Use Nano Banana Pro Edit to clean up these product shots so they sit on pure white.

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

How to set up Nano Banana Pro Edit in opencode

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

Use Spiral's MCP server

  1. Add the server

    Leave out --global to add Spiral to the current project only. No header and no client ID or secret: opencode registers itself with Spiral.

    opencode mcp add spiral --global --url https://api.spiral.ai/mcp
  2. Sign in

    Your browser opens. Sign in to Spiral, pick the organization and click Authorize, then return to the terminal. No API key. Inside opencode, /mcps starts the same sign-in.

    opencode mcp auth spiral
  3. Check it

    Spiral shows as connected.

    opencode mcp list

Use the Spiral skill

  1. Send opencode 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 Pro Edit

    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-pro-image-preview/edit",
        "input": {
          "prompt": "make a photo of the man driving the car down the california coastline"
        }
      }'

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

Nano Banana Pro Edit providers and prices

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

falImage
Gemini 3 Pro Image Preview · Image Editing
fal-ai/gemini-3-pro-image-preview/edit

Settings you can ask for

Nano Banana Pro Edit works from your prompt, image URLs, and system prompt. Ask opencode 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.

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, including 1:4, 4:1, 1:8 and 8:1.

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.

Resolution1K, 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.

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.

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

What can you do with Nano Banana Pro Edit in opencode?

Turn project briefs and documentation into posters, diagrams, and visual concepts with Nano Banana Pro. A coding agent can gather the relevant project context and prepare a specific image brief with approved text.

Product photo revisions

Start with a product photo and describe a specific change to its setting or composition. Compare the result with the original before using it.

Translation inside existing artwork

Start with an existing poster or package design and replace its wording with approved translated copy. Review the result for lettering and layout changes.

Sketches developed into product mockups

Use a product sketch as the starting image and describe the materials, finish, and presentation needed for a visual concept.

Revisions to diagrams and posters

Start with an existing graphic and request a focused change, such as replacing a heading or moving a label. Check spelling and placement after the edit.

Questions about Nano Banana Pro Edit in opencode

Can opencode use Nano Banana Pro Edit?

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

How much does Nano Banana Pro Edit cost in opencode?

`resolution`: 1K (default) $0.195, 2K $0.195, 4K $0.39 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 opencode plan is separate.

Do I need a fal account to use Nano Banana Pro Edit in opencode?

No. Spiral runs Nano Banana Pro Edit 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 Pro Edit in opencode?

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

Does opencode wait while Nano Banana Pro Edit runs?

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

What is Nano Banana Pro good at?

Posters with readable headlines, labeled diagrams, product mockups, and multilingual graphics are useful starting points. Give it a concrete brief with the exact wording and layout you want.

How large can Nano Banana Pro images be?

Nano Banana Pro supports 1K, 2K, and 4K output. Choose the output size deliberately rather than asking for a vague description such as high resolution.

Can Nano Banana Pro write text inside an image?

Yes, including text for posters and diagrams. Small lettering and long paragraphs remain weak spots, so keep essential copy short and inspect it before use.

Can Nano Banana Pro make graphics in different languages?

Yes, it can generate localized text and translate text inside images. Supply the approved wording when exact phrasing matters.

How should I write a Nano Banana Pro prompt?

Write a complete description of the scene instead of a string of keywords. Include the subject, intended use, composition, lighting, and exact text so the brief leaves fewer decisions unspecified.

Get started

Start using Nano Banana Pro Edit in opencode

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

Paste this into opencode:

Set up opencode

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