CI smoke test for Ideogram 4.5 on Sume: one low-quality image
A bash and jq check that submits one 1K low-quality Ideogram 4.5 image, passes on 200 or 202, and explains 401, 402 and 429. List price is $0.03.

A smoke test should prove the key, the route and the model id all still work, at the lowest cost. Ideogram 4.5 (ideogram/ideogram-v4.5) at quality: "low", resolution: "1K" and n: 1 is the cheapest setting; the Sume image docs list it at $0.03 per image. At that price 200 runs a month is about $6.00 at list.
Treat both 200 and 202 as a pass. The route waits up to 30 seconds and answers 200 with data[].url, or 202 with a job envelope when it is slower.
The script
#!/usr/bin/env bash
set -euo pipefail
: "${SUME_API_KEY:?set SUME_API_KEY}"
status=$(curl -sS -o smoke.json -w '%{http_code}' https://api.sume.com/v1/images \
-H "x-api-key: $SUME_API_KEY" -H 'content-type: application/json' \
-H "idempotency-key: ci-smoke-${CI_SMOKE_TAG:-local}" \
-d '{"model":"ideogram/ideogram-v4.5","prompt":"a plain white mug on a grey table","quality":"low","resolution":"1K","n":1}')
case "$status" in
200) jq -e '.data[0].url' smoke.json ;;
202) jq -e '.data.job.id' smoke.json ;;
*) echo "smoke failed: HTTP $status"; jq -r '.error.code // empty' smoke.json; exit 1 ;;
esacReading a failure
| Status | Likely cause | Fix |
|---|---|---|
| 401 | Key missing, malformed or revoked | Rotate the CI secret |
| 402 | insufficient_credits | Top up the wallet |
| 429 | Rate limit or queue_full | Rerun later; same key replays |
| 400 | Unsupported field such as seed or stream | Remove it |
Keep the test honest
- Set
CI_SMOKE_TAGper pipeline so reruns replay the same job instead of billing twice. - Do not download or diff the image; a URL or job id is enough to prove the path.
- Store the key in your CI secret store, never in the repository.
Sources
Related posts
More in Developers
- Clamp video duration when swapping Sora for a Sume video model
Each Sume video id has its own seconds range, so old Sora code can ask for a length a model rejects. Clamp per id before you submit; Python table of limits.
- Claude Code PreToolUse hook: block paid Sume calls without a spend cap
A PreToolUse hook that denies Sume generate and TTS tools when max_spend_usd or idempotency_key is missing. Python hook with the settings.json matcher, tested.
- AGENTS.md rules for a coding agent that calls Sume over hosted MCP
Six AGENTS.md lines that stop a coding agent double-billing Sume video jobs: idempotency_key, jobs_wait slices, dry_run, plus a CI lint script.
- 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.
Written by Sume