Python asyncio price check: one Omni Flash clip at four resolutions
A runnable Python script submits a 3-second Omni Flash clip at 360p, 720p, 1080p and 4K together and prints usage.cost. Expect $2.20 in total.

The script below submits the same 3-second prompt to Gemini Omni Flash 1.1 at four resolutions at once through POST /v1/videos, polls each job and prints the status and usage. It is the fastest way to confirm Sume prices against your own balance. Expect a total of 220 cents: 12 + 38 + 57 + 113.
The script
It uses requests inside asyncio.to_thread so the four jobs run concurrently without an extra HTTP library. Set SUME_API_KEY in the environment before you run it.
import asyncio, os, time, requests
H = {"Authorization": f"Bearer {os.environ['SUME_API_KEY']}"}
URL = "https://api.sume.com/v1/videos"
def run(res):
body = {"model": "gemini-omni-flash-1.1",
"prompt": "A paper boat drifting on a puddle",
"resolution": res, "duration": 3,
"aspect_ratio": "16:9"}
job = requests.post(URL, headers=H, json=body).json()
while True:
s = requests.get(job["polling_url"], headers=H).json()
if s["status"] in ("completed", "failed", "cancelled"):
return res, s["status"], s.get("usage")
time.sleep(10)
async def main():
tasks = [asyncio.to_thread(run, r)
for r in ("360p", "720p", "1080p", "4K")]
for row in await asyncio.gather(*tasks):
print(row)
asyncio.run(main())What you should see
usage.cost is the Sume billable amount in dollars on the poll response. The expected values are in the table.
Sume rounds each clip up to the next whole cent, so a clip total is ceil(seconds x rate), not a sum of fractional cents.
| Resolution | Arithmetic | Cents | usage.cost |
|---|---|---|---|
| 360p | 3 x 3.75 | 12 | 0.12 |
| 720p | 3 x 12.5 | 38 | 0.38 |
| 1080p | 3 x 18.75 | 57 | 0.57 |
| 4K | 3 x 37.5 | 113 | 1.13 |
| Total | 12 + 38 + 57 + 113 | 220 | 2.20 |
Notes for a real run
The loop polls every 10 seconds; the docs suggest a moderate interval such as 30 seconds for production. Add a timeout and a callback_url if you do not want to hold a process open.
Check status before you read the video. Add an Idempotency-Key header to each submit if you wrap the call in a retry loop, so a repeated POST returns the original job.
The same length at every tier
For reference, a 3-second Omni Flash clip at each resolution. Every price is the seconds times the billable rate, rounded up to a whole cent, as of 2026-10-08.
| Resolution | Arithmetic | Billed |
|---|---|---|
| 360p | 3 x 3.75 = 11.25 cents | $0.12 |
| 720p | 3 x 12.5 = 37.5 cents | $0.38 |
| 1080p | 3 x 18.75 = 56.25 cents | $0.57 |
| 4K | 3 x 37.5 = 112.5 cents | $1.13 |
Limits to remember
These apply to every request on this page, from the Video Router and Video generation docs:
- Length is 3 to 10 whole seconds in generation modes; an edit takes no duration.
- Aspect ratio is 16:9 or 9:16; an edit takes no aspect ratio.
- Native synced audio is always on, and
generate_audio: falseis rejected. - There is no
bitrate_mode, no reference audio and noseed. - Billing is the provider list times 1.25 per output second, reserved at submit and shown in
usage.cost.
Sources
Related posts
More in Developers
- Python check: is this MP4 over TikTok's 516 kbps? Size and duration
A short Python function turns file bytes and duration_seconds into average kbps and tests TikTok's 516 kbps floor, 500 MB cap and 10-minute limit.
- Python fallback chain for Sume video models: 404 and 503 only
After the Sora API shutdown, a model chain must not retry everything. This Python function moves on at 404 and 503 and stops on 429, 402, 400, 409.
- Python: find Sume image models that list a ratio like 8:1 or 4:5
A 15-line Python script reads GET /v1/images/models and prints every Sume image model that lists a given aspect ratio, so you stop guessing before a 400.
- Python match on a Sume /v1/videos poll: five statuses, one handler
Python 3.10 structural matching on the poll dict: wait on pending and in_progress, return on completed, raise on failed or cancelled. Runs under asyncio.run.
Written by Sume