Pick the Sume video model in code: seconds, ratio, edit or swap
A 12-line Python function turns duration, aspect ratio, edit and swap needs into the models that can run the job. A 4 s 1:1 clip has none; a 12 s one has two.

Three limits decide which of Omni, H3 and H3 Max can run a clip: the length (Omni 3-10 s, MiniMax 5-15 s), the aspect ratio (Omni 16:9 or 9:16 only) and whether you edit an existing clip (Omni only). Put the limits in a table in code, and a 4-second 1:1 clip returns no candidates, while a 12-second 1:1 clip returns H3 and H3 Max.
Recast is a separate lane with its own rule: a source of 5-30 seconds. Prices below come from the Sume price tool (read 2026-10-09).
The function
The code mirrors the catalog constraints. Treat it as a first filter, and read supported_durations and supported_resolutions from GET /v1/videos/models for the final word.
LIMITS = { # (min s, max s, aspect ratios)
"gemini-omni-flash-1.1": (3, 10, {"16:9", "9:16"}),
"minimax-h3": (5, 15, {"16:9", "9:16", "1:1", "4:3", "3:4", "21:9"}),
"minimax-h3-max": (5, 15, {"16:9", "9:16", "1:1", "4:3", "3:4", "21:9"}),
}
def candidates(seconds, ratio, edit=False, swap=False):
if swap:
return ["h3-max-recast"] if 5 <= seconds <= 30 else []
if edit:
return ["gemini-omni-flash-1.1"]
return [m for m, (lo, hi, ar) in LIMITS.items()
if lo <= seconds <= hi and ratio in ar]
print(candidates(12, "1:1")) # ['minimax-h3', 'minimax-h3-max']
print(candidates(4, "1:1")) # []What it returns for six requests
The 4 s 1:1 row is the one the filter catches: Omni is long enough for 4 seconds but has no square, and MiniMax has the square but starts at 5 seconds.
| Request | Candidates | Cheapest price |
|---|---|---|
| 3 s, 9:16 | Omni | $0.375 (Omni) |
| 8 s, 9:16 | Omni, H3, H3 Max | $0.60 (H3), $0.80 (H3 Max), $1.00 (Omni) |
| 12 s, 1:1 | H3, H3 Max | $0.90 (H3), $1.20 (H3 Max) |
| 4 s, 1:1 | None | Make a 5 s clip: $0.375 on H3 |
| 20 s, 16:9 | None | Two jobs |
| Edit a clip | Omni | Per output second at the resolution |
| Swap a person, 12 s source | Recast | $4.50 |
Break ties on price
When two or more models pass the filter, price decides. For an 8-second 9:16 clip, H3 at 768p is $0.60 and Omni at 720p is $1.00, so H3 is 40% cheaper. That is a price fact only; look at a sample of each before you commit a campaign to one.
Limits and gotchas
When the function returns two or more candidates, pick on price and look, not on limits.
- The ratio list for MiniMax also includes
adaptive; the code leaves it out because it is an input-driven value, not a fixed shape. - Omni and MiniMax both have native audio always on, so audio is never a reason to choose one.
- Resolution is a second filter: H3 has no 1080p row and H3 Max has no 2K or 4K.
- Hard-coding the table ages. Compare it with the catalog whenever you deploy.
Sources
Related posts
More in Developers
- Poll every 2 s or 30 s? Reads per 20-minute video job on Free and Pro
Polling a Sume video job every 2 s is 600 reads in 20 minutes; every 30 s is 40. Share of the read budget on Free and Pro, with a Python check.
- Status reads for a full Sume queue: 3,600 to 72,000
Poll every accepted job every 2 s for 20 minutes: Free makes 3,600 reads, Scale 72,000. The math, and how one field cuts it.
- Polling a 5-minute video: 30 s is 10 reads, 2 s is 150 on Sume
How often to poll a Sume video job: read counts for a 300 s job at 30 s and 2 s, and an asyncio loop that obeys next_poll_after_seconds.
- Porting chat history to Agent Completions: assistant turns fail
Sume Agent Completions take OpenAI-style messages but return 400 on any assistant turn and start each call in a new thread. What to send instead.
Written by Sume