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.

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.
| Item | Value |
|---|---|
| Threads max duration | 300 seconds |
| Threads max file size | 1 GB |
| Recording length | 1260 seconds |
| Parts needed | 5 (4 x 300 s, 1 x 60 s) |
| Trim jobs at $0.02 | $0.10 total |
| Sume source limit | 1800 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
- Threads video aspect ratio runs 0.01:1 to 10:1: Sume Timeline sizes
Meta's Threads page allows ratios from 0.01:1 to 10:1 with 9:16 recommended and 1920 px max width. Sizes that Sume Timeline can output inside those bounds.
- TikTok 500 MB cap and 10 minutes: the bitrate that fits is 6.67 Mbps
TikTok's non-Spark in-feed ad page allows 10 minutes and 500 MB or less. A full 10 minute ad fits only at 6.67 Mbps or below. The arithmetic and a Sume render.
- TikTok 516 kbps minimum bitrate: a 30 second ad is at least 1.94 MB
TikTok's non-Spark spec lists bitrate of 516 kbps or more. The smallest file for 15, 30 and 60 seconds is shown with the math, plus how to check a Sume render.
- TikTok ad caption rules: no links, @ or hashtags, and a 4-line limit
TikTok's in-feed ad page says captions can't hold links, @ symbols or hashtags, and Spark captions max out at 4 lines. A Python lint to run before you submit.
Written by Sume