Extract audio from a 30-minute video: the 900-second cap
Audio detach accepts a source up to 1800 seconds but returns at most 900 seconds of audio per job. Use range to split a 30-minute video into two detaches.

Audio detach reads a video of up to 1800 seconds but returns at most 900 seconds of audio per job, so a 30-minute source needs a range. Send two jobs, { "start": 0, "end": 900 } and { "start": 900 }, then join or split later with timeline audio.
What are the caps?
From the Audio detach docs:
| Case | Result |
|---|---|
| Source up to 1800 s | Accepted |
| Source longer than 1800 s | source_duration_exceeded (worker) |
| Whole track past 900 s, no range | Needs a range |
range longer than 900 s, or end <= start | audio_detach_range_empty |
range.start past the source | detach_start_past_source (worker) |
How do I split it into two detaches?
Each job needs its own Idempotency-Key. range.end is open-ended when omitted, so the second job runs to the end of the video. The default output is wav (pcm_s16le), sample-exact.
curl -X POST https://api.sume.com/v1/audio-detach \
-H "Authorization: Bearer $SUME_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: detach-part-1" \
-d '{
"video_url": "https://media.sume.com/artifacts/artf_demo/talk.mp4",
"range": { "start": 0, "end": 900 }
}'
# second job: same body with "start": 900 and a new keyWhat if the video is over 1800 seconds?
Detach cannot read it (source_duration_exceeded). Cut the video first with Video trim, described in trim, filter and detach, then detach each piece. Probe the source length first with video inspect.
How does the job run?
Audio detach defaults to mode: "async". Pass mode: "sync" to wait up to 30 seconds for a 200 finished job, or you get 202 and poll GET /v1/jobs/:id/status and GET /v1/jobs/:id/result. There is no GET /v1/audio-detach/:id. Idempotency-Key is required. The result is kind: audio_detach with audio_url, duration_seconds, format, channels and sample_rate; sample_rate is null when you omitted it and the source rate was inherited. For two ranges, submit two jobs and read both audio_url values.
Detach is not clip inspection. For probing, stills or transcripts use video inspect; for a new MP4 cut use video trim, described in the Audio detach docs.
Sources
Related posts
More in Media tools
- ffmpeg -vn -ac 1 -ar 16000 as audio detach API fields
Audio detach rejects raw ffmpeg fields such as af, filter, cmd and codec. Map -ac, -ar and -ss/-to to channels, sample_rate and range; mp3 is 128 kbps.
- audio_parts_channel_mismatch: concat needs one channel layout
Timeline audio concat fails with audio_parts_channel_mismatch when parts mix channel layouts. Detach video audio as mono for every part.
- audio_parts_shorter_than_duration: fix a Timeline audio spine
Timeline 1.0 refuses audio.parts[] whose declared lengths sum to less than audio.duration_seconds. Add part length, lower the duration, or use silence mode.
- Combine more than 20 audio files: nest the concat jobs
Timeline audio concat takes 1 to 20 parts per job. For 45 files, concat in batches of 20 or fewer, then concat the batch outputs. Four jobs, $0.04 flat.
Written by Sume