Preflight a video request against the catalog before you pay
Check duration, resolution, aspect ratio, frame types and reference types against a GET /v1/videos/models entry in Python, and catch the 400 fields up front.

You can catch most rejected video requests before submitting by checking the request against the model's entry in GET /v1/videos/models. Compare duration to supported_durations, resolution to supported_resolutions, aspect_ratio to supported_aspect_ratios, and each reference type to supported_input_references. A short Python function does it in a few lines.
Sume's video generation docs (read 2026-10-02) say to check these fields before submitting, because limits are not uniform across models. They also list three request fields that are always rejected on the v1 route, which a preflight should block too.
What does a preflight check?
It compares each request field with the descriptor that gates it and returns a list of problems. Keep it dumb: it does not predict quality, only whether the request can be accepted.
def preflight(model, req):
problems = []
d = req.get("duration")
if d is not None and d not in (model.get("supported_durations") or []):
problems.append(f"duration {d} not supported")
res = req.get("resolution")
if res and res not in (model.get("supported_resolutions") or []):
problems.append(f"resolution {res} not supported")
ar = req.get("aspect_ratio")
if ar and ar not in (model.get("supported_aspect_ratios") or []):
problems.append(f"aspect_ratio {ar} not supported")
allowed = model.get("supported_input_references") or []
for ref in req.get("input_references") or []:
if ref.get("type") not in allowed:
problems.append(f"reference type {ref.get('type')} not supported")
for banned in ("size", "seed"):
if banned in req:
problems.append(f"{banned} is rejected on the v1 route")
if (req.get("provider") or {}).get("options"):
problems.append("provider.options is rejected on the v1 route")
return problemsWhich fields are always rejected?
The docs say these on the v1 route. Preflight them even though they look harmless, because they are common in clients written for other APIs.
| Field | What happens | Use instead |
|---|---|---|
size | 400 unsupported_parameter | resolution plus aspect_ratio |
seed | Rejected; every model reports seed: false | Log the job id and request |
provider.options | 400 unsupported_parameter | Nothing; allowed_passthrough_parameters is empty |
How do I use it?
Fetch the catalog once per run, pick the entry whose id equals the model you will call, and run preflight on each request before you submit. If the list is empty, send the job; if not, fix the request or pick another model. Whole-second durations only: the catalog lists integers, so a value like 4.5 will not match.
Sources
Related posts
More in Developers
- Python preflight for a YouTube Short: length and shape check
A short Python script that reads Sume's video inspect probe and flags a clip over 180 seconds or not square or vertical, including 90 degree rotation.
- Preflight a Sume image request against capability descriptors
Catch unsupported_parameter before you send: fetch the model descriptors, then check each field of your request against enum, range and boolean types.
- Probe a 30-second AI clip before joining it: video inspect, no stills
Run video inspect with frames false to read a generated clip's probe facts, free, before it goes into a Timeline join. Python script and what the docs promise.
- Rerun an image script without paying twice: prompt-hash keys
Derive the Idempotency-Key from the request body so a crashed script that reruns cannot create a second paid image job. Includes the 409 case when you edit.
Written by Sume