curl and jq script to test a new Sume image model id in one command
A 6-line shell script that posts one prompt to Sume POST /v1/images for any model id and prints the url, cost and status, to vet a gpt-image-1 replacement fast.

To test a replacement for a retiring image model, run one script that takes the model id as an argument, posts a prompt to POST https://api.sume.com/v1/images, and prints the image URL, usage.cost and status. It uses only curl and jq, so it works on a laptop or in a CI step. Run it once per candidate id and compare.
The script does not use --fail, so a 404 model_not_found or 400 unsupported_parameter body is printed instead of swallowed.
The script
Save it as try-model.sh and make it executable. A 202 response has the job envelope under data, so the script prints status_url from there when data is not a list.
#!/usr/bin/env bash
set -euo pipefail
MODEL="${1:?usage: try-model.sh <model-id> [prompt]}"
PROMPT="${2:-a ceramic mug on linen, soft window light}"
curl -sS https://api.sume.com/v1/images \
-H "Authorization: Bearer ${SUME_API_KEY:?set SUME_API_KEY}" \
-H "Content-Type: application/json" \
-d "$(jq -n --arg m "$MODEL" --arg p "$PROMPT" '{model:$m,prompt:$p}')" |
jq 'if (.data|type)=="array" then {url: .data[0].url, cost: .usage.cost}
elif (.data|type)=="object" then {pending: .data.status_url}
else . end'Ids to try first
| Command | What it tests |
|---|---|
| ./try-model.sh openai/gpt-image-2.5-sunburst | The vendor-named replacement |
| ./try-model.sh openai/gpt-image-2.5 | Flare variant |
| ./try-model.sh google/nano-banana-2 | A different family |
| ./try-model.sh gpt-image-1 | Expect 404 model_not_found |
What to compare
Compare the printed cost, which is the billed USD, and open each URL beside the old output. Then record the winning id in config, as in the model-map post. To test many prompts, loop over a file, and for parameters that differ per model see the preflight post. The shutdown dates are in the main post.
Sources
Related posts
More in Developers
- Cursor mcp.json for the hosted Sume server: env interpolation or OAuth
Cursor reads .cursor/mcp.json with url and headers and supports ${env:NAME}. Pass the Sume key from the environment, or omit headers and use OAuth. Validated.
- Cyber Monday product videos in bulk: a Sume Format queue
Adobe expects $15.1B on Cyber Monday. How to run one Sume Format over a product list with a bulk queue, concurrency 1 to 16, and recheck failed items.
- How to watch the Sume image model list for new and removed models
Image catalogs change. Snapshot GET /v1/images/models each night and diff the ids in Python, so a retired or new model reaches you before a request fails.
- Django webhook view for an AI video job: csrf_exempt and HMAC check
A Django view that verifies Sume's x-sume-webhook-signature over timestamp.raw_body, rejects an empty secret, and handles job.completed for a /v1/videos clip.
Written by Sume