Remove part of a video by API: cut a section and rejoin
Video trim keeps one range per job. To cut a section out of the middle, render the kept ranges back to back in one Sume Timeline 1.0 job.

To remove part of a video with the Sume API, render the parts you keep back to back in one POST /v1/timeline-1.0/render: each kept range becomes an audio.parts[] slice of the video's detached audio and a video[] slot that reads the same range of the video with source_in. Video trim alone keeps just one [start, end) range per job, so it cannot close the gap.
The facts come from Sume's Timeline 1.0, Audio detach, Video trim, Timeline audio, and Video inspect docs and the Sume API reference, read on 2026-09-27. Anything described as current behavior is read from Sume's code. A single trim is covered in Trim, filter, or detach audio.
Why can't video trim remove a middle section?
A trim returns a new MP4 holding only [start, end) of one clip. To drop seconds 20–35 of a 60-second clip, you keep two ranges, [0, 20) and [35, 60), and join them. One Timeline render can read both ranges straight from the source file, so the only other job is the audio detach.
- The source must already be your workspace's
media.sume.comartifact or asset, such as an earlier Sume job's output. Timeline, trim, and detach do not fetch from the open internet. - The REST asset upload routes are hidden from the public API reference, and media imports do not take YouTube links or arbitrary video URLs.
How do I find the section to remove?
Use a transcript. POST /v1/video-inspect with transcribe: true returns words[], each with start and end in seconds from the start of the video, and the gaps between words are the pauses. Put each cut inside a pause so no word is clipped. With segmentation.mode: "sentence", gapless sentence segments[] give you whole sentences to drop.
The transcript bills at the STT 1.0 rate, $0.01 per audio minute; the probe and stills are unbilled, so a visual cut point costs nothing to find.
How do I build the render?
Detach the source's audio with POST /v1/audio-detach. Its default output is a sample-exact wav, the format Timeline's audio wants. Then write one audio part and one video slot per kept range:
- Audio part:
urlis the detached wav,source_inthe range's start, anddurationits length. Parts join gaplessly in the sample domain, and each names its ownurl, so several can read the same file. - Video slot:
source_urlis the original MP4, with the samesource_inandduration. Itsstartis the running total of the kept lengths before it, andvideo[0].startis 0. audio.duration_secondsis the sum of the kept lengths. If the parts' declared lengths add up to less, the render refuses withaudio_parts_shorter_than_duration.- Leave out
transition, and setoutput.widthandoutput.heightto the source's size, because the default output is 1080×1920. The unbilledPOST /v1/timeline-1.0/planchecks the body first.
curl -X POST https://api.sume.com/v1/timeline-1.0/render \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: talk-cut-001" \
-d '{
"audio": {
"duration_seconds": 45,
"parts": [
{ "url": "https://media.sume.com/artifacts/artf_demo/talk.wav", "source_in": 0, "duration": 20 },
{ "url": "https://media.sume.com/artifacts/artf_demo/talk.wav", "source_in": 35, "duration": 25 }
]
},
"output": { "width": 1920, "height": 1080 },
"video": [
{ "source_url": "https://media.sume.com/artifacts/artf_demo/talk.mp4", "start": 0, "duration": 20, "source_in": 0 },
{ "source_url": "https://media.sume.com/artifacts/artf_demo/talk.mp4", "start": 20, "duration": 25, "source_in": 35 }
]
}'What if I keep more than 20 ranges?
audio.parts[] stops at 20 entries, while video[] takes up to 200 slots. For more kept ranges, join the audio first with POST /v1/timeline-1.0/audio and operation: "concat". Each job takes 1–20 parts of the same { url, source_in, duration } shape and returns one audio_url plus segments[], the offsets the docs say to re-base video[].start against. Join groups of 20, then join the results, and pass the final file as audio.url.
What does it cost, and what are the limits?
The render reserves ceil(audio.duration_seconds / 60) minutes, so the 45-second example reserves one. Each step bills on its own, plus a 5.5% agent fee by default. One detach outputs at most 900 seconds, so a longer source needs two detaches with range, and each part's source_in then counts from its own file's start.
| Step | Call | Billing | Limits |
|---|---|---|---|
| Find the cut | POST /v1/video-inspect | $0.01 per audio minute for a transcript | Source ≤ 1,800 s |
| Audio | POST /v1/audio-detach | Flat per job, in GET /v1/catalog | Source ≤ 1,800 s; output ≤ 900 s |
| Check | POST /v1/timeline-1.0/plan | Unbilled | No job, no reservation |
| Render | POST /v1/timeline-1.0/render | $0.10 per output minute | Output 1–1,800 s; ≤ 20 audio parts; 1–200 slots, each ≥ 0.2 s |
| Join audio | POST /v1/timeline-1.0/audio | Flat per job, in GET /v1/catalog | 1–20 parts; ≤ 1,800 s produced |
Sources
Related posts
More in Media tools
- Shopify product image size and video specs for AI media
Shopify says 2048 x 2048 px usually displays best for square product images. Request that size from Sume, then check Shopify's other caps.
- TikTok video specs for API uploads and ads, mapped to Sume
TikTok's posting API takes MP4, WebM, or MOV at 23–60 fps, 360–4,096 px, and up to 10 minutes. How a Sume clip maps to that, and how to upload it.
- Translate a video's voiceover by API: STT, TTS, Timeline
Replace a video's spoken track with Sume: transcribe it, translate the lines yourself, speak them with TTS, and render the video over the new voice.
- Video editing API: which Sume endpoint for each edit
A task-to-endpoint map of Sume's video editing API: which call cuts, crops, captions, joins, or re-voices a video, and which guide explains each edit.
Written by Sume