Translate text inside an image: one Nano Banana 2 edit per language
Google says Nano Banana 2 can translate and localize text within an image. Loop one edit per language through Sume POST /v1/images and keep the layout fixed.

To localize an image that has text in it, send the original as an input_references URL to google/nano-banana-2 with one instruction per language, and set aspect_ratio to auto so the layout is not recropped. Google's launch post says Nano Banana 2 can 'translate and localize text within an image' (Google, read 2026-10-01). Sume exposes the model on POST /v1/images, so a loop of N languages is N edit calls.
This is an edit, not a redraw: you are asking the model to keep the artwork and swap the words. Check every output, because short headlines survive better than dense paragraphs.
What do I send?
The fields below come from the Image API docs.
| Field | Value | Why |
|---|---|---|
model | google/nano-banana-2 | The model Google describes for text localization |
input_references | One public HTTPS image URL | The source artwork |
aspect_ratio | auto | Docs advise auto on edits to match the input |
n | 1 | One result per language, easy to label |
What does the loop look like?
Keep the instruction short and name the exact strings you want, so the model does not invent copy. Each call can return a hosted URL in data[0].url.
import os
import requests
H = {"Authorization": f"Bearer {os.environ['SUME_API_KEY']}"}
SRC = os.environ["SOURCE_IMAGE_URL"]
LANGS = ["Spanish", "German", "Japanese"]
for lang in LANGS:
r = requests.post("https://api.sume.com/v1/images", headers=H, timeout=60,
json={"model": "google/nano-banana-2", "aspect_ratio": "auto",
"prompt": f"Translate all text in this image to {lang}. "
"Keep the artwork, fonts and layout unchanged.",
"input_references": [{"type": "image_url",
"image_url": {"url": SRC}}]})
print(lang, r.status_code, r.json().get("data", [{}])[0].get("url"))How do I check the result?
Have a fluent reader look at each file. Models can swap characters in scripts with many glyphs, and Japanese or Arabic need the most scrutiny. If a language fails, retry that language alone rather than the batch. The cost of each call is in usage.cost; add them up before committing to a large language list.
Limits
Google's claim is from its own post and I did not test accuracy per language. A 202 job envelope means the call outlasted the 30-second sync wait; poll the job. The model may reflow text that is longer in the target language, so leave room in the original design.
Sources
Related posts
More in Use cases
- Nano Banana Pro 4:5 is not 1080x1350: crop and resize in Python
On Sume, Nano Banana Pro takes 4:5 at about 928x1152, not exact 1080x1350. Resize to Instagram's size locally with Pillow, with the small crop explained.
- Narrate a 2,000-word blog post with an AI voice: cost and steps
A 2,000-word post is roughly 12,000 characters, so one Sume TTS job at $0.0475 per 1,000 characters. The steps, settings and what to check before publishing.
- New York FAIR News Act: AI video labels and what is pending
New York's FAIR News Act would require a label on news video substantially made by generative AI. It awaits the governor; here is what the sources say.
- New York synthetic performer ad law: dubbing and audio-only exceptions
New York S8420A exempts AI used only to translate a human performer's language, audio-only ads and expressive works. What that means for a dubbed ad.
Written by Sume