Nano Banana 2.1 inpainting: Google's prompt template, no mask on Sume

Google edits one region of an image by prompt on Nano Banana 2.1. Sume has no mask_url for it, which is GPT Image 2.5 only. The template, and when to switch.

4 min readSume
All posts

Nano Banana 2.1 does not take a mask image. Google's guide calls its method "inpainting (semantic masking)" and does it with a sentence: name the one element to change and tell the model to keep everything else the same. On Sume that is the only way for this model, because mask_url works on the GPT Image 2.5 rows alone.

What is Google's template?

The guide gives this template, which you fill in with the element and its replacement:

  • Using the provided image, change only the [specific element] to [new element/description].
  • Keep everything else in the image exactly the same, preserving the original style, lighting, and composition.

What does the Sume call look like?

Send the image as an input_references item and the template as the prompt. Use aspect_ratio: "auto" so the result matches the reference's shape; if you omit it, the result is not the same as auto. Reference URLs must be public HTTPS.

{
  "model": "google/nano-banana-2.1",
  "prompt": "Using the provided image of a living room, change only the blue sofa to a vintage brown leather chesterfield. Keep everything else unchanged.",
  "input_references": [
    {
      "type": "image_url",
      "image_url": {
        "url": "https://example.com/living-room.jpg"
      }
    }
  ],
  "aspect_ratio": "auto",
  "resolution": "2K"
}

When should I use a mask instead?

Use mask_url when the region is hard to name or you need it to be exact. The GPT Image 2.5 rows (Flare and Sunburst) accept mask_url and up to 16 references. OpenAI's guide notes that masking with GPT Image is entirely prompt-based, so the shape may not be followed with complete precision (read 2026-10-09). The mask is guidance, not a hard clip, on either route.

Sending mask_url to Nano Banana 2.1 returns 400 unsupported_parameter. See mask_url on GPT Image 2.5 for that route.

Region edits on Sume (docs and code on main, read 2026-10-09)
ModelRegion edit byMax references
google/nano-banana-2.1Prompt only10
openai/gpt-image-2.5 (Flare)Prompt or mask_url16
openai/gpt-image-2.5-sunburstPrompt or mask_url16

What does each route cost?

Nano Banana 2.1 is $0.10, $0.15 or $0.20 billed per image by tier. GPT Image 2.5 depends on quality and size; read the endpoint line in the image models docs before you batch.

Whatever route you choose, compare the result to the source image at 100 percent. Prompt-only edits can drift lighting or texture outside the named region, and a mask is guidance for GPT Image, not a hard clip. A quick difference blend in your editor shows exactly which pixels changed, and it takes less time than another paid call.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume