YouTube thumbnail test set: n=4 on GPT Image 2.5 high may return 202
Four 1280x720 thumbnail takes cost $0.1425 on GPT Image 2.5 high via Sume, and a slow call can return 202 instead of 200. A Python client that handles both.
A four-take thumbnail test set at 1280x720 on ChatGPT Image 2.5 high costs about $0.1425 on Sume ($0.0356 each), and the call may come back as 202 instead of 200. Sume's image route waits up to 30 seconds, then returns a job envelope if the work is not done; the Image API docs name high quality, 4K and a large n as the likeliest slow configurations. Branch on the status code, not on the body shape.
Treat both outcomes as success. A 202 means Sume accepted and is still working; do not submit again.
What does the client look like?
On 200 the images are in data[].url. On 202 you poll the status URL and fetch the result, and the artifacts carry the Sume-hosted URLs.
import os, time, requests
B = "https://api.sume.com/v1"
H = {"Authorization": f"Bearer {os.environ['SUME_API_KEY']}"}
r = requests.post(f"{B}/images", headers={**H, "Idempotency-Key": "thumb-ep42"},
timeout=60, json={"model": "openai/gpt-image-2.5", "n": 4,
"prompt": "YouTube thumbnail: shocked chef, steaming pot, bold empty space left",
"image_size": {"width": 1280, "height": 720}, "quality": "high"})
r.raise_for_status()
if r.status_code == 200:
print([d["url"] for d in r.json()["data"]])
else:
job = r.json()["data"]["job"]["id"]
while not requests.get(f"{B}/jobs/{job}/status", headers=H, timeout=60).json().get("data", {}).get("terminal"):
time.sleep(5)
print(requests.get(f"{B}/jobs/{job}/result", headers=H, timeout=60).json())What does the test set cost by quality?
Four 1280x720 takes of one prompt, no references. Lower tiers are less likely to cross the 30-second wait.
| Quality | Per take | Four takes |
|---|---|---|
| low | $0.0040 | $0.016 |
| medium | $0.00925 | $0.037 |
| high | $0.0356 | $0.1425 |
| xhigh | $0.0631 | $0.2525 |
What about retries?
Reuse the same Idempotency-Key on a retry of the same request, so a lost response returns the original job rather than starting and billing a second one. A client timeout does not cancel the job, so keep the job id. Prices here are list x 1.25 in dollars per image before whole-cent rounding; the catalog's billable formula reads "list x 1.25, ceil usd cents", so confirm the first charge in usage.cost and budget from the invoice, not from the sum.
Sources
Related posts
More in Developers
- Zed context_servers for the hosted Sume server: no header means OAuth
Add the hosted Sume server to Zed's settings.json context_servers with a url. With no Authorization header Zed runs the MCP OAuth flow, so start with mcp:read.
- 13 days after the Sora Videos API removal: the Sume /v1/videos route
OpenAI removed the Sora Videos API on September 24 with no replacement. What a team that still needs API video gets from Sume: submit, poll, download.
- 19 Omni jobs or 7 Wan jobs: Timeline render strategy for 181 s
A 181-second Reel is 7 Wan clips or 19 Omni clips. Timeline render.strategy auto chunks past 12 segments and single is refused above 12.
- 1920x1088 works on GPT Image 2.5 where 1920x1080 fails: the 16 rule
1080 is not a multiple of 16, so a custom 1920x1080 size is rejected on ChatGPT Image 2.5. Use 1920x1088 or 1536x864, then trim. Prices included.
Written by Sume