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.

4 min readSume
All posts

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.

Candidates and cheapest price (read 2026-10-09). Omni at 720p, MiniMax at 768p; Recast at 768p.
RequestCandidatesCheapest price
3 s, 9:16Omni$0.375 (Omni)
8 s, 9:16Omni, H3, H3 Max$0.60 (H3), $0.80 (H3 Max), $1.00 (Omni)
12 s, 1:1H3, H3 Max$0.90 (H3), $1.20 (H3 Max)
4 s, 1:1NoneMake a 5 s clip: $0.375 on H3
20 s, 16:9NoneTwo jobs
Edit a clipOmniPer output second at the resolution
Swap a person, 12 s sourceRecast$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

All Developers posts

Written by Sume