Filter the Sume video catalog in Python for 1080p and audio references

Instead of guessing which video model takes what, read GET /v1/videos/models and filter it. This Python script lists models with 1080p and audio_url references.

4 min readSume
All posts

Call GET /v1/videos/models, read the data array and filter on supported_resolutions and supported_input_references. The script below keeps models that list 1080p and accept audio_url references, and prints each one's id and durations.

This beats a hard-coded table, because the catalog is what validation uses. A value the catalog does not list gets a 400, so the catalog is the one source of truth about what you can send.

What each catalog row carries

Each VideoModel has id, supported_resolutions, supported_aspect_ratios, supported_durations, supported_frame_images, supported_input_references, generate_audio and pricing_skus. supported_input_references is the one Sume adds on top of the OpenRouter shape, because some models reject references that others accept.

pricing_skus maps each SKU to a price string, and the SKU unit differs by model (for example per 1,000 video tokens), so compare like with like.

Catalog fields worth filtering on, read 2026-10-05
FieldTypeUse it to
supported_resolutionslist of stringscheck 720p, 1080p or 4K before you submit
supported_durationslist of integerscheck that your length is allowed
supported_input_referenceslist of image_url, video_url, audio_urlknow whether audio or video references work
supported_frame_imagesfirst_frame, last_framecheck image-to-video support
generate_audiobooleanknow if audio is generated

The script

It uses only the standard library. Change the two filter lines to ask a different question, such as models that accept video_url references or a 15-second duration.

import json, os, urllib.request

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:
    models = json.load(r)["data"]

for m in models:
    refs = m.get("supported_input_references") or []
    if "1080p" in (m.get("supported_resolutions") or []) and "audio_url" in refs:
        durs = m.get("supported_durations") or []
        print(m["id"], min(durs, default=None), max(durs, default=None), m.get("pricing_skus"))

Reading the result

The output has one line for each model that passes both tests. A model that is absent either lacks 1080p or rejects audio references. sume/auto is never in the list, because it is not a model, but the guide documents it.

If a row has a null or empty list for a field, the script treats it as not supported. That is the safe reading, since a value the catalog does not advertise returns a 400.

Use it in a pre-flight check

Run the filter on startup in a service that picks models for users. Cache the result for a few minutes, and pick from it, instead of shipping a table that ages. When a model is added, the filter picks it up with no code change.

Pair it with the pricing field to compare the models that pass, within the same SKU unit.

  • Fail early with a clear message when no model passes the filter.
  • Log the catalog's model ids with each job so a later review can see what was offered.
  • Do not send a field the row does not list, because it will be a 400, not a silent drop.

Related posts

More in Developers

All Developers posts

Written by Sume