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.

5 min readSume
All posts

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.

Four 1280x720 thumbnails on GPT Image 2.5, billable USD (list x 1.25), read 2026-10-06
QualityPer takeFour 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

All Developers posts

Written by Sume