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.

5 min readSume
All posts

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.

Two overlapping ranges, two files (read 2026-10-03)
RangeMeaningOutput
start 0, end 12.4First 12.4 secondsOwn audio_url
start 0, no endWhole fileOwn audio_url

Rules and refusals

  • A range whose end is not after start returns audio_range_end_before_start.
  • Sending parts with a split returns audio_split_takes_no_parts.
  • A split with no url returns audio_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

All Developers posts

Written by Sume