Moving a Gemini 2.5 Flash Image client to Sume: base64 becomes a URL

gemini-2.5-flash-image shut down on October 2. If you move the call to Sume's Images API, the result is a signed URL in data[].url, not an inline file.

5 min readSume
All posts

Google's deprecations page lists a shutdown date of October 2, 2026 for gemini-2.5-flash-image. If you move that call to Sume, the request changes to POST /v1/images, and the result changes too: Sume returns Sume-hosted, signed URLs in data[].url, not inline base64. Your parser needs a download step, not a decode step.

What changes in the request

Send a catalog model id, a prompt, and optional input_references. For a Nano Banana family model use google/nano-banana-2 or google/nano-banana-pro. aspect_ratio and resolution (512, 1K, 2K, 4K where listed) are top level fields. Read the live list with GET /v1/images/models before you pin an id.

curl -s -X POST https://api.sume.com/v1/images \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"google/nano-banana-2","prompt":"A ceramic mug on a linen cloth, soft window light","aspect_ratio":"4:5"}' \
  | jq -r '.data[0].url' | xargs curl -s -o mug.png

What changes in the response

The 200 body carries created, model, data[] with url and media_type, and usage.cost in USD. Token counts in usage are 0 in v1 because Sume meters images per image. model echoes the id you sent.

  • Replace base64 decoding with an HTTP download of data[].url.
  • Read media_type to choose the file extension.
  • Read usage.cost for spend, not token counts.
  • Expect 202 with a job envelope when a slow configuration passes the 30 second wait.

Handle 202 as a normal path

Branch on the status code, not the body shape. On 202, poll status_url, then fetch result_url. The standard job endpoints return the job result shape, not the image body. High resolution and large n are the likeliest to take this path.

Check the old id errors

If a log still shows the old Google id, grep for it and replace it everywhere, including config files and tests. Sume also accepts the bare Image Router ids such as nano-banana-2 as aliases. For a wider look at the error side, read what to check after the Oct 2 shutdown.

A migration checklist

  • Find every use of the old model id, including tests and environment files.
  • Change the endpoint to POST /v1/images and add a bearer key from the environment.
  • Replace the base64 decode with a download of data[].url.
  • Add a branch for 202 with polling on status_url.
  • Log usage.cost per call for spend tracking.
  • Run one call per aspect ratio you use and check the output shape.

Send references the Sume way

Where the old code attached an inline image, send input_references with a public HTTPS image_url. Sume rejects localhost, private-network and non-HTTPS URLs before submission, so upload local files to a public location first.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume