Cut a 90 s music window: timeline-audio split and range end errors
Use timeline-audio split with ranges [{start, end}] to cut a window. end must exceed start or you get audio_range_end_before_start; omit end for the rest.

To cut a 90 second window from a longer audio file with Sume, send POST /v1/timeline-1.0/audio with operation: "split", the file url, and ranges: [{ "start": 30, "end": 120 }]. If a range has end less than or equal to start, you get audio_range_end_before_start and the hint fix_range_bounds. Omit end to run to the end of the file.
The 90 second figure is not arbitrary. YouTube says most songs can be used for up to 90 seconds in a three-minute Short, with some at 60 or 30 seconds (YouTube Help, read 2026-10-05). That limit applies to music used through YouTube's own tools, so a cut like this is a production step, not a rights decision.
The request
The split operation takes a top-level url and one to 20 ranges. Ranges may overlap, and each returns its own audio_url in segments[]. The output is wav by default, which is sample-exact, or mp3 through output.format, which adds priming padding at each edge. It costs $0.01 per job in the public pricing constant. Send an Idempotency-Key and poll GET /v1/jobs/:id/status, because there is no GET route on the audio path.
{
"operation": "split",
"url": "https://media.sume.com/artifacts/artf_demo/track.wav",
"ranges": [{ "start": 30, "end": 120 }]
}Errors in this route
Most failures are shape mistakes, and each has a stable code from the timeline audio docs.
| Mistake | Code |
|---|---|
| end is at or before start | audio_range_end_before_start |
| split without url | audio_split_requires_url |
| split without ranges | audio_split_requires_ranges |
| parts sent with split | audio_split_takes_no_parts |
| ranges outside 1 to 20 entries | schema refusal |
A Python check for your ranges
The check below catches the end-before-start mistake locally, for example when a range is built from a beat timestamp minus a lead-in. It adds nothing the API does not already enforce, but it saves a round trip.
def bad_ranges(ranges):
return [r for r in ranges if "end" in r and r["end"] <= r["start"]]
print(bad_ranges([{"start": 30, "end": 120}, {"start": 90, "end": 60}]))Reading the result
The result is kind: timeline_audio with a segments[] list. Each segment carries its own audio_url, and the produced audio is at most 1800 seconds. For a 90 second window, check that the returned duration_seconds is about 90 before you use the file as audio.url in a Timeline 1.0 render, where the same value goes into audio.duration_seconds. If you want several windows, for example a 30, a 60 and a 90 second cut for platforms with different limits, put them all in one ranges array and pay for one job.
When not to use this
Splitting the audio is only half of a platform music rule. YouTube also says a Short over one minute with an active Content ID claim is blocked and cannot be monetized, and royalty-free tracks in its Audio Library do not get claims. Cutting a track shorter does not clear a claim. If you want a bed that is made for the clip, Sume's music docs describe the generated option. For the audio of a video file, use audio detach first, then split.
Sources
Related posts
More in Media tools
- Day of the Dead video music: a 60-second tribute brief
Brief an instrumental bed for a 60-second Day of the Dead tribute video with guitarron, trumpet and harp: one generation, one render, $0.225 on Sume.
- Dental clinic explainer: a calm AI music bed and its cost
Brief a calm, non-medical-sounding instrumental for a 90-second clinic explainer, duck it under the voiceover and see the audio cost: $0.325 on Sume.
- Did my Wan 3.0 clip actually cut between shots? Check with stills
Wan 3.0 advertises auto scene splitting, so verify it: pull stills at named seconds with Sume video inspect, or read shot cuts with reference ingest.
- Die-cut sticker outline from a transparent gpt-image-2.5 PNG in Pillow
Request background=transparent on Sume, then add a white die-cut border by growing the alpha channel with MaxFilter. Code, border width math, and print notes.
Written by Sume