Burn the same required line onto 50 product clips with Sume cues

One cue request per clip puts the same required text on every product video in a batch. Idempotency keys, the 60 second limit, and a $10.00 batch cost.

4 min readSume
All posts

Some lines must ride along on every clip: a warning, a price note, a legal footer. Doing it by hand across a catalog invites a missed video. Caption cues let a script burn the identical text onto each file, and the same loop is your audit trail.

Why cues, not speech captions

Standalone video captions normally transcribe speech. Product clips are often silent, and a silent clip fails as caption_no_speech on that path. Passing cues with text, start and end skips speech-to-text and burns exactly what you wrote, which also means the wording never depends on a transcript.

Limits that shape the loop

The captions docs list all of these.

  • video_url must be a fetchable public HTTPS URL; localhost, private-network and signed URLs are rejected.
  • Source videos are up to 60 seconds, so split longer cuts first.
  • One cue holds up to 400 characters, and end must be greater than start.
  • cues cannot be combined with words, segments or script_text.

The loop

Derive the idempotency key from the file URL so a rerun of the whole script returns the original jobs instead of charging again. Keep the line in an environment variable and stop if it is empty.

import hashlib
import os
import requests

line = os.environ["REQUIRED_LINE"]
if not line.strip():
    raise SystemExit("REQUIRED_LINE is empty")
urls = [l.strip() for l in open("clips.txt") if l.strip()]
for url in urls:
    key = "line-" + hashlib.sha256(url.encode()).hexdigest()[:24]
    r = requests.post(
        "https://api.sume.com/v1/video-captions",
        headers={
            "Authorization": f"Bearer {os.environ['SUME_API_KEY']}",
            "Idempotency-Key": key,
        },
        json={"video_url": url,
              "cues": [{"text": line, "start": 0, "end": 8}]},
        timeout=60,
    )
    print(r.status_code, url)

Cost of a batch

Each accepted standalone caption job reserves and captures $0.20 for a video up to 60 seconds, per the docs. Confirm live pricing in GET /v1/catalog.

Batch cost at $0.20 per clip (captions docs, read 2026-10-03)
ClipsCost
10$2.00
50$10.00
200$40.00

If clips need assembling first

When the line should sit on a finished cut, assemble with Timeline 1.0 at $0.10 per output minute and burn the cue onto the output MP4. For toys, the CPSC says advertising for toys subject to the choking hazard warning requirement must use the same warning label, per its guidance; take the wording from your compliance file, not from this post.

Log every status code the script prints. A clip whose request returned a non-2xx status has no line, and shipping it is the miss the loop exists to prevent.

Sources

Related posts

More in Use cases

All Use cases posts

Written by Sume