Cut a 30-minute recording into two 15-minute files: 2 trims, $0.04
Sume video trim accepts a 1,800-second source but returns at most 900 seconds per job. Two trims at $0.02 split a 30-minute file; the range rules explained.

To split a 30-minute recording with an API, send two POST /v1/video-trim jobs: start: 0, duration: 900 and start: 900, end: 1800. Sume accepts sources up to 1,800 seconds but returns at most 900 seconds per trim, so a full-length file needs two jobs. At $0.02 per job the pair costs $0.04.
The limits
The contract limits come from packages/api-contract and are repeated in the docs: source at most 1,800 seconds, output at most 900 seconds, output at least 0.2 seconds. You send start plus exactly one of end or duration.
| Case | Result |
|---|---|
| Source over 1800 s | source_duration_exceeded (worker) |
| Range longer than 900 s | video_trim_range_empty |
| Both end and duration | video_trim_range_conflict |
| Neither end nor duration | video_trim_range_required |
| end after source end | Clamped; warning trim_clamped_to_source |
Worked example
Half one is start: 0, duration: 900. Half two is start: 900, end: 1800, which is exactly 900 seconds and therefore allowed. Because end clamps rather than fails, a recording of 1,742 seconds can use the same second request and simply come back at 842 seconds with a clamp warning.
Cost: 2 jobs x $0.02 = $0.04. Cutting into three 10-minute parts (600 seconds each) is 3 x $0.02 = $0.06. Price depends on the number of jobs, not on the length cut.
# half one
curl -X POST https://api.sume.com/v1/video-trim \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: rec-half-1" \
-d '{"video_url":"https://media.sume.com/artifacts/artf_demo/rec.mp4","start":0,"duration":900}'
# half two: same call, Idempotency-Key rec-half-2, with
# "start":900,"end":1800Sources longer than 30 minutes
A source over 1,800 seconds fails in the worker with source_duration_exceeded, so a two-hour file cannot be trimmed directly. The docs give no way around the source cap on this surface. Do the first cut before import, or work from a file that is already under the cap. The same 1,800-second ceiling applies to audio detach, and the timeline render's own audio cap is also 1,800 seconds.
Choosing split points
Splitting at 900 seconds is arithmetic, not editing. If the recording has a natural break, such as the end of a section, you can cut there instead, as long as each piece stays at or under 900 seconds. For a 1,800-second file that leaves no room: two pieces must each be exactly 900 seconds, so the only valid split point is 900. For a 1,500-second file the split point can fall anywhere from 600 to 900 seconds.
The general rule is that n pieces cover at most n x 900 seconds, and the source cannot exceed 1,800 seconds. Use three pieces, for example 600 seconds each, when you want shorter files, which costs 3 x $0.02 = $0.06. Check actual_start_seconds on each result if you use keyframe precision, to avoid overlaps or gaps between pieces.
Reading the results
Each job returns a new video_url (never the source), duration_seconds, and actual_start_seconds. With the default exact precision the first half starts at 0 and the second at 900. Each trim needs its own Idempotency-Key, so two different ranges are not collapsed into one job.
Sources
Related posts
More in Media tools
- Trim a 10 s moment and stack a product still: two jobs, $0.04
Video trim ($0.02) cuts the moment, and Timeline compose ($0.02) stacks a still above it as a 9:16 MP4. A 200-clip batch is $8.00 in worker jobs.
- Trim a 200-second take to a 180-second YouTube Short for 2 cents
YouTube Shorts can run up to three minutes. A 200-second take needs one exact video-trim job (start 0, duration 180) at $0.02. Here is the request.
- Trim a Reel clip's dead start and end from first and last word
Take the first word's start and the last word's end from STT, then add 0.15 s lead and 0.30 s tail: a 29.9 s clip becomes 1.69-27.92 s for $0.03.
- Trim end 184 on a 172-second source: it clamps and warns, no error
Video trim clamps an end past the source length and returns warning trim_clamped_to_source. A 4 to 184 cut of a 172.4 s clip yields 168.4 s for $0.02.
Written by Sume