Which video model takes 30 seconds? Filter the Sume catalog in Python

Ask GET /v1/videos/models which models accept duration 30 at 1080p instead of hard-coding ids. A short Python filter, and why Omni and Kling 3 drop out.

4 min readSume
All posts

Ask the catalog instead of hard-coding model ids: call GET /v1/videos/models and keep the models whose supported_durations include 30 and whose supported_resolutions include 1080p. On Sume's current catalog, that is a short list led by Seedance 2.5 and Wan 3.0, while Gemini Omni Flash 1.1 (3 to 10 seconds) and Kling 3 (4 to 15 seconds) drop out of the filter.

Why filter at runtime

Model limits change faster than code. Sume's own docs say limits are different for each model, so read capabilities from the catalog and do not assume one envelope. The catalog controls validation too: if a model does not advertise a resolution, duration, aspect ratio or reference type, the value gets a 400 and the API never silently drops the field.

A runtime filter turns a class of 400 unsupported_capability errors into a client-side decision. It also means that when a new model with a 30-second ceiling lands in the catalog, a script like this one finds it without a deploy.

What the catalog says today

These are the documented ceilings for the models that matter for long clips. Always trust the live response over this table, since the table is a snapshot.

Duration and resolution limits, Sume Video Router docs (read 2026-10-05)
Model idDurationResolutionsTakes 30 s
seedance-2.54 to 30 s480p, 720p, 1080pYes
wan-3.02 to 30 s480p, 720p, 1080pYes
h3-max-recast5 to 30 s (source length)768p, 1080pSource video only
kling-34 to 15 s720p, 1080pNo
gemini-omni-flash-1.13 to 10 s360p, 720p, 1080p, 4KNo

The filter

The function takes the wanted duration, resolution and aspect ratio, and returns matching model ids. It reads the catalog with your key, because the catalog endpoint is authenticated like the rest of the API.

import json, os, urllib.request

def catalog():
    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.loads(r.read())["data"]

def models_for(duration, resolution, aspect):
    out = []
    for m in catalog():
        if (duration in (m.get("supported_durations") or [])
                and resolution in (m.get("supported_resolutions") or [])
                and aspect in (m.get("supported_aspect_ratios") or [])):
            out.append(m["id"])
    return out

print(models_for(30, "1080p", "16:9"))
print(models_for(8, "4K", "9:16"))

Reading the result

The first call should list the long-clip models. The second, with 8 seconds at 4K in 9:16, should list Gemini Omni Flash 1.1, since Google's own Omni docs and Sume's catalog agree that 4K is available at 16:9 and 9:16 only. If a list comes back empty, the combination does not exist, and the honest answer is to lower one parameter or to split the work.

The catalog also tells you which reference types a model takes through supported_input_references. Kling 3 has no reference_*_urls, while the Seedance 2.x family takes image, video and audio. Filter on that field the same way before you build a reference-to-video request.

When no single model fits

Over 30 seconds, no catalog model takes a single job, so a longer piece is several jobs and a join. Plan it as separate Idempotency-Keys, one for each segment, so a retry of segment three cannot touch segment two. That is the practical meaning of a 30-second ceiling: it is a limit on one job, and your pipeline is free to run many.

  • Cache the catalog for a few minutes, not per request.
  • Log the model id you chose, since sume/auto hides the resolved family on purpose.
  • Prefer an explicit model id when a customer pays per second, so the price is predictable.
  • Re-run the filter in CI, and fail loudly if the list for your standard request is empty.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume