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.
- 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.
- Does a crossfade shorten a Short? Timeline start times explained
In Sume Timeline the declared start of each slot is authoritative, so a crossfade does not eat into the total length. How to keep a Short under its limit.
- Does my Short have audio? Check probe.has_audio before captions
Transcribing a silent clip returns inspect_source_has_no_audio. Probe has_audio first with a frames:false video inspect, then caption only clips with a voice.
Written by Sume