Detect a new video model on Sume: a Python diff of /v1/videos/models

Grok Imagine 1.5 Lite is on xAI's price table, not Sume's. A short Python script diffs GET /v1/videos/models against a saved list to flag new ids.

5 min readSume
All posts

The way to know when Sume adds a model is to read GET /v1/videos/models on a schedule and compare the id list to a saved copy. xAI's models page lists Grok Imagine Video 1.5 Lite at $0.020 a second, but Sume's video catalog documents grok-imagine-video-1.5 and no Lite id, so sending a Lite id returns 404 model_not_found. The script below prints any id that appears or disappears.

The script

The catalog is the source of truth for validation: if a model does not advertise a resolution, aspect ratio or duration, the API gives a 400. The route needs your API key. It saves the last list to video_models.json next to the script and exits 1 when the list changed, which makes it easy to run from a scheduler.

import json, os, sys, urllib.request

req = urllib.request.Request(
    "https://api.sume.com/v1/videos/models",
    headers={"Authorization": f"Bearer {os.environ['SUME_API_KEY']}"},
)
with urllib.request.urlopen(req, timeout=30) as r:
    models = json.load(r)["data"]

now = {m["id"]: m.get("supported_resolutions") for m in models}
path = "video_models.json"
before = json.load(open(path)) if os.path.exists(path) else {}

added = sorted(set(now) - set(before))
removed = sorted(set(before) - set(now))
for i in added:
    print("new:", i, now[i])
for i in removed:
    print("gone:", i)
json.dump(now, open(path, "w"), indent=2)
sys.exit(1 if (added or removed) and before else 0)

What to do with a hit

Run it daily. The first run just saves the list. A later run that prints new: ... is your cue to read that row's supported_resolutions, supported_durations, supported_frame_images and pricing_skus before you route traffic to it. A row can appear and disappear by environment: some rows are listed only where their provider is configured.

Model ids named by vendors this week vs Sume's documented catalog (read 2026-10-13)
Vendor nameWhere it is pricedDocumented Sume id
Grok Imagine Video 1.5xAI: $0.080 per secondgrok-imagine-video-1.5
Grok Imagine Video 1.5 LitexAI: $0.020 per secondNone documented
Gemini Omni FlashGoogle: default video modelgemini-omni-flash-1.1

Sources

Related posts

More in Developers

All Developers posts

Written by Sume