gemini-2.5-flash-image is gone: list Sume /v1/images/models first

Google shut down gemini-2.5-flash-image on Oct 2, 2026. On Sume, list GET /v1/images/models, pick an id, then POST /v1/images. Curl and JS fetch included.

5 min readSume
All posts

Google's deprecations page lists a shutdown date of October 2, 2026 for gemini-2.5-flash-image, with gemini-3.1-flash-image-preview as its recommended replacement (Gemini deprecations, read 2026-10-05). If you route image calls through Sume, do not hard-code a replacement id. Read GET /v1/images/models, then send one of those ids to POST /v1/images.

Step 1: list what Sume serves

The image catalog is the source of truth for ids, capabilities and prices. Each row has an id, an architecture block and supported_parameters, plus an endpoints URL for per-endpoint records.

curl "https://api.sume.com/v1/images/models" \
  -H "Authorization: Bearer $SUME_API_KEY"

Step 2: submit with a catalog id

POST /v1/images is synchronous by default. It waits up to 30 seconds and returns 200 with data[].url, or 202 with a job envelope when the wait runs out. Results are Sume-hosted signed URLs, not inline base64, so a parser that decoded base64 must download the URL instead.

const res = await fetch('https://api.sume.com/v1/images', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.SUME_API_KEY}`,
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({
    model: 'bytedance-seed/seedream-4.5',
    prompt: 'a red panda astronaut, studio lighting',
  }),
});
console.log(res.status, await res.json());

Handle both outcomes

A 202 is not a failure. It carries status_url and result_url, and you continue with the jobs endpoints. A 400 unsupported_parameter means you sent a field the chosen model does not list, such as a ratio outside its enum. Sume rejects it instead of dropping it silently.

Use the catalog on every deploy, not once. Model ids come and go, and the catalog is the only list that matches what the API accepts that day.

Read the capability descriptors

Each catalog row describes its parameters with three descriptor types: enum for a fixed list of values, range for integers between a minimum and maximum, and boolean for supported or absent. A model that lists aspect_ratio as an enum of five values will reject a sixth with 400 unsupported_parameter.

A short preflight in your deploy script avoids shipping a request shape that the new model cannot take. Fetch the row, check that every field you send is present, and fail the build if one is missing.

DescriptorMeaningExample check
enumDiscrete list of allowed stringsaspect_ratio value must be in values[]
rangeInteger within min and maxn between min and max
booleanPresent means supportedmask_url key exists

Know the price before you call

Each endpoint record lists pricing lines with a cost_usd per billable unit, and the docs say these lines already include the Sume margin. You pay cost_usd × n. Failed or cancelled generations are not charged.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume