Watch the Sume video catalog for new ids and changed limits in Python

Fetch GET /v1/videos/models, save a snapshot and diff new ids, removed ids and changed durations or resolutions. A Python script, testable offline.

4 min readSume
All posts

Fetch GET /v1/videos/models on a schedule, keep the last response, and diff the two: new ids, removed ids, and changed supported_durations, supported_resolutions or supported_aspect_ratios. Video catalogs move quickly. Google's changelog shows Gemini Omni Flash in public preview on June 30, 2026 and GA on August 27, 2026, 58 days apart, with the length and resolution options widening at GA.

Why a diff beats reading release notes

A new model id or a longer duration list changes what your code can request. A removed id changes what will fail. The Gemini changelog is vendor-side; your own snapshot shows what your account sees. The endpoint returns each model's id, supported_durations, supported_resolutions, supported_aspect_ratios, supported_input_references and pricing_skus, as documented in the video docs.

The script

The diff function is pure, so you can test it without a key. The fetch function uses the standard library and reads the key from the environment.

import json, os, urllib.request

WATCH = ('supported_durations', 'supported_resolutions', 'supported_aspect_ratios', 'pricing_skus')

def diff(old, new):
    a = {m['id']: m for m in old}
    b = {m['id']: m for m in new}
    out = [f'new: {i}' for i in sorted(b.keys() - a.keys())]
    out += [f'removed: {i}' for i in sorted(a.keys() - b.keys())]
    for i in sorted(a.keys() & b.keys()):
        for k in WATCH:
            if a[i].get(k) != b[i].get(k):
                out.append(f'changed: {i} {k}')
    return out

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, timeout=30) as r:
        return json.load(r)['data']

if __name__ == '__main__':
    old = [{'id': 'm1', 'supported_durations': [4, 8]}]
    new = [{'id': 'm1', 'supported_durations': [4, 6, 8]}, {'id': 'm2'}]
    print(diff(old, new))

Running it

Call fetch() from a daily cron job, load yesterday's file, print diff(old, new), then overwrite the file. Post any non-empty result to the channel where your team plans video work. The sample in __main__ prints a new model and a changed duration list, which is the output you want to see when something moves.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume