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.

4 min readSume
All posts

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.

Video trim limits and refusals (Sume docs, read 2026-10-09)
CaseResult
Source over 1800 ssource_duration_exceeded (worker)
Range longer than 900 svideo_trim_range_empty
Both end and durationvideo_trim_range_conflict
Neither end nor durationvideo_trim_range_required
end after source endClamped; 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":1800

Sources 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

All Media tools posts

Written by Sume