Detect new Sume video models daily: a Python catalog diff

Kling 4.0 and others may land any day. A short Python script diffs GET /v1/videos/models against yesterday's snapshot and prints new and removed model ids.

4 min readSume
All posts

Short answer

Call GET /v1/videos/models on a schedule, save the result, and diff ids against the previous snapshot. The response is a data array, and each model has an id, supported_durations, supported_resolutions and supported_input_references per the video docs. A new id means a new model; a missing id means a model went away or its provider is not configured. The script below prints both.

The script

It stores the snapshot as video-models.json next to the script, so the first run reports every id as new. Run it daily from cron or a scheduled job.

import asyncio, json, os, pathlib, urllib.request

SNAP = pathlib.Path("video-models.json")

def fetch():
    req = urllib.request.Request(
        "https://api.sume.com/v1/videos/models",
        headers={"Authorization": "Bearer " + os.environ["SUME_API_KEY"]},
    )
    with urllib.request.urlopen(req) as r:
        return {m["id"]: m for m in json.load(r)["data"]}

async def main():
    now = await asyncio.to_thread(fetch)
    old = json.loads(SNAP.read_text()) if SNAP.exists() else {}
    for mid in sorted(set(now) - set(old)):
        print("NEW", mid, now[mid].get("supported_durations"))
    for mid in sorted(set(old) - set(now)):
        print("GONE", mid)
    SNAP.write_text(json.dumps(now))

asyncio.run(main())

Why a diff beats reading blog posts

In launch weeks, announcements run ahead of access. Kling 4.0 Flash is a closed beta and full Kling 4.0 is expected in October, so a post saying it exists is not a statement that you can call it. The catalog is the only list that says what your key can submit to today.

What to watch

Catalog changes and the right reaction (Sume docs, read 2026-10-04)
Diff resultWhat it meansReaction
NEW idA model was added to the catalogRead its durations, resolutions and references, then run a small test
GONE idRemoved, or its provider is not configuredCheck whether a pinned id in your code still resolves
Changed durationsLimits movedRe-validate any hard-coded length
higgsfield-genjutsu absentListed only when its provider is configuredNot an error

Steps

  • Put the script on a daily schedule and send the output to a channel your team reads.
  • On NEW, run one 480p draft before any production traffic.
  • Keep a pinned id for production and use the diff only for discovery.
  • Pair it with a dated price check: new models carry their own rate, which Sume bills at provider list times 1.25.

Making the alert useful

Send the output to a channel with the id, duration range and resolutions, not only the word NEW. Add the date and your key's workspace name so the message is self-explanatory a week later. If you run several environments, snapshot each separately: the catalog can differ when a provider is configured in one and not in another, which is exactly how higgsfield-genjutsu appears and disappears.

Caveats

The diff only compares ids, so compare the fields you care about if limits matter. Do not auto-switch production to a new id because it appeared; that is a decision, not an event.

Related posts

More in Developers

All Developers posts

Written by Sume