Hook and full cut from one track: overlapping Timeline audio splits
Timeline audio split ranges may overlap, up to 20 per job at $0.01. Cut a 15-second hook and the full track from one song or voice-over in a single call.

Why overlap matters
A short ad needs a hook; the long version needs the whole thing. With most splitters you have to cut twice or accept that ranges cannot overlap. The Timeline audio docs say that for operation: split, ranges may overlap, and one job can carry between 1 and 20 ranges.
Each range is { start, end? }, with end omitted meaning the rest of the file.
A request
The request below makes a 12.4-second hook and the full track in one call. The source must be Sume-hosted audio from this workspace. Import first if it is not.
Send it to POST /v1/timeline-1.0/audio with an Idempotency-Key. The result carries segments[], each with its own audio_url.
{
"operation": "split",
"url": "https://media.sume.com/artifacts/artf_demo/spine.wav",
"ranges": [
{ "start": 0, "end": 12.4 },
{ "start": 0 }
]
}What you get back
Both outputs are wav by default, sample-exact, and the whole job costs $0.01 flat. The music or voice-over is not re-generated, so you pay nothing for the extra slice.
| Range | Meaning | Output |
|---|---|---|
| start 0, end 12.4 | First 12.4 seconds | Own audio_url |
| start 0, no end | Whole file | Own audio_url |
Rules and refusals
- A range whose
endis not afterstartreturnsaudio_range_end_before_start. - Sending
partswith a split returnsaudio_split_takes_no_parts. - A split with no
urlreturnsaudio_split_requires_url. - Off-host URLs are rejected at admission, so import first.
Picking the hook point
For music from the router, listen for the first strong phrase and cut shortly after it ends, not mid-note. If a prompt asked for a fixed length, the track may still run a little over or under, so measure the returned duration before choosing a range.
Remember the tail: a hook that stops on a held note sounds cut off. Ending on a beat or a phrase boundary sounds intentional.
When to use it
Use it for the classic cut-down: hook for a six-second bumper, mid-length for a social post, full for a landing page. If the source is the audio track of a video, run audio detach once and then split here.
If you generated music with the router, remember its length is steered by the prompt, not a duration field, so cut to exact length with a split. See exact-length music.
Sources
Related posts
More in Developers
- duck_requires_audio_spine: no music ducking under silence mode
Timeline refuses soundtrack.duck_db when audio.mode is silence, since there is no voice to duck under. The fix, the other silence rules, and a check.
- timeline_must_start_at_zero and transition_on_first_segment fixes
Timeline 1.0 needs video[0].start to be 0 and no transition on slot 0. How to open on a fade or a later in-point, with a Python builder that runs.
- Timeline segment_overlap: set start times when clips cross-fade
Sume Timeline returns segment_overlap when a slot starts before the previous one ends minus the fade. The rule, the fix, and a Python check.
- Timeline transition_too_long: 1 s cap and half the shorter clip
transition_too_long means a Timeline fade is over 1 s or over half the shorter neighbour. Sub-frame fades fail too. Limits, snapping, and a check.
Written by Sume