Threads API video max is 300 s: split a 21-minute talk into parts

The Threads API page lists video up to 300 seconds and 1 GB. Split a 21-minute recording into five trim requests with a small Python script. $0.02 per trim.

3 min readSume
All posts

A 21-minute recording needs five parts to fit Threads' video limit: four of 300 seconds and one of 60 seconds. Meta's Threads API page lists a maximum duration of 300 seconds (5 minutes) and a maximum file size of 1 GB for video posts. Sume's video_trim can cut each part from a source up to 1800 seconds, at $0.02 per job, so the split costs $0.10.

Numbers

Windows are computed from the 300-second cap on the vendor page.

Threads API video limits vs the 21-minute split (vendor page read 2026-10-08)
ItemValue
Threads max duration300 seconds
Threads max file size1 GB
Recording length1260 seconds
Parts needed5 (4 x 300 s, 1 x 60 s)
Trim jobs at $0.02$0.10 total
Sume source limit1800 seconds

Steps

Import the recording once with POST /v1/media-imports; each trim reads the imported media.sume.com URL. The script below prints one request body per part.

import json, math

def windows(total, part=300.0):
    n = math.ceil(total / part)
    return [{"start": i * part,
             "duration": min(part, total - i * part)} for i in range(n)]

for w in windows(1260):
    print(json.dumps({"video_url": "https://media.sume.com/artifacts/artf_demo/talk.mp4", **w}))

Send each body to POST /v1/video-trim with a unique Idempotency-Key, such as the part number. Use duration (not end), because sending both is refused with video_trim_range_conflict. Leave precision on exact for clean cuts at part boundaries.

Posting is separate

Sume produces the files. You publish them with Meta's Threads API, which has its own container and publish steps that I did not test.

Moving the cut points

Fixed 300-second windows are easy to compute but they cut wherever the clock says. If you would rather end each part at a sentence break, request a transcript with sentence segments from video_inspect and pick the segment ends nearest to each 300-second mark. Then use those times as your start values and compute each duration as the difference.

Remember the trim output limit is 900 seconds and the source limit is 1800 seconds, so a 21-minute (1260 second) recording is well inside the source limit. A 40-minute recording is not: it would need to be cut into pieces first with a different tool, because trim refuses sources above 1800 seconds with source_duration_exceeded.

Each part also needs its own post. Label them in order in the post text so viewers can follow along.

Budget and detail

Two details keep a batch like this tidy. First, name the parts in your records by index and start time, such as part 1 at 0 seconds and part 5 at 1200 seconds, so you can map every result back to its window. Second, give each trim a distinct Idempotency-Key, and reuse the same key only when you retry the same window. Reusing one key across different windows would make the requests look like the same job.

What Sume does not do

Sume does not post to Threads, and it does not break a recording at natural pauses. Cut points here are fixed 300-second windows, which may split a sentence. Use sentence segments from video_inspect if you want to move a boundary.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume