Pick a Sume video model in code: audio refs, 1080p, 20 seconds

Filter GET /v1/video-router/models on reference_audios, resolutions and duration_seconds, then submit the survivor with reference_audio_urls (up to five).

5 min readSume
All posts

Read GET /v1/video-router/models once, keep the models whose capabilities show reference_audios, include 1080p in resolutions, and have a duration_seconds range that covers 20, then submit with reference_audio_urls. The catalog is the source of truth for limits, and each entry reports its own envelope.

The docs name seedance-2.5 (4 to 30 seconds at 480p, 720p and 1080p) as one model in that range, but run the filter instead of trusting a list that may change.

Which catalog fields decide it?

Each catalog item has the same capabilities shape, so one loop covers every model.

Catalog fields used by the filter (Sume OpenAPI, read 2026-10-09)
NeedFieldCheck
Audio referencescapabilities.reference_audiostrue
1080pcapabilities.resolutionscontains 1080p
20 secondscapabilities.duration_secondsmin <= 20 <= max
Aspect ratiocapabilities.aspect_ratioscontains your ratio

What is the filter?

Run it at start-up and cache the answer for the session.

import os, requests

H = {"Authorization": f"Bearer {os.environ['SUME_API_KEY']}"}
r = requests.get("https://api.sume.com/v1/video-router/models",
                 headers=H, timeout=30)
r.raise_for_status()

def fits(c, res="1080p", secs=20):
    d = c["duration_seconds"]
    return (c["reference_audios"] and res in c["resolutions"]
            and d["min"] <= secs <= d["max"])

for m in r.json()["data"]["models"]:
    if fits(m["capabilities"]):
        print(m["id"], m["capabilities"]["duration_seconds"])

How do I send the audio?

On Video Router the field is reference_audio_urls, one to five public HTTPS URLs (a model can set a lower ceiling; Wan 3.0 allows five, MiniMax H3 three). It needs at least one reference image or video alongside it, so the example sends an image too. On /v1/videos the same assets go in input_references as audio_url entries, with at most twelve references across all types. If the call returns 400, the error names the field to fix.

curl -X POST https://api.sume.com/v1/video-router/generate \
  -H "Authorization: Bearer $SUME_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: narrated-demo-001" \
  -d '{
    "model": "seedance-2.5",
    "prompt": "A presenter at a standing desk, steady camera",
    "reference_image_urls": ["https://example.com/presenter.jpg"],
    "reference_audio_urls": ["https://example.com/voiceover.mp3"],
    "resolution": "1080p",
    "duration": 20,
    "aspect_ratio": "16:9",
    "mode": "async"
  }'

What if the filter returns nothing?

Relax one condition at a time, in the order of what costs least to give up: the resolution first, then the aspect ratio, then the duration, which you can often cover by joining two shorter clips. If the audio reference is the hard requirement, keep it and lower the rest. An empty list is a plain answer, not an error, so print it and stop instead of falling back to a model you did not check.

Why does a 20-second clip need async?

The sync and subscribe modes wait at most 30 seconds, which is a budget for the HTTP request and not a job duration. A long clip almost never finishes inside it, so submit async and poll status_url.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume