Extract audio from a long video: the 900 s output cap and range

Audio detach takes sources up to 1800 s but outputs at most 900 s. For a longer track pass range and detach in two calls. Errors included.

4 min readSume
All posts

POST /v1/audio-detach accepts a source up to 1800 s but writes at most 900 s of audio. For a longer video, pass range: { start, end } for each stretch of up to 900 s, so a 25-minute video needs two detach calls.

This is from the Audio detach docs, read 2026-09-30.

What does range do?

range is an optional { start, end? } in seconds. Omit it for the whole track; an omitted end runs to the end of the file. A range whose end is at or before start, or that is longer than 900 s, fails with audio_detach_range_empty. A start past the probed duration fails with detach_start_past_source.

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/long-talk.mp4",
    "range": { "start": 0, "end": 900 }
  }'

Should I detach many times or split once?

For many ranges from one talking-head MP4, the docs say detach once, then split the file with POST /v1/timeline-1.0/audio (operation: "split", 1 to 20 ranges). That only works while the track fits in one detach; for a video over 900 s of audio, detach in ranges and split each result.

What else can fail?

A video with no audio track fails detach_source_has_no_audio; check probe.has_audio first with video inspect and frames: false. A source over 1800 s fails source_duration_exceeded. Each detach is $0.01 per job.

Audio detach caps (https://docs.sume.com/models/audio-detach, read 2026-09-30)
LimitValueError when exceeded
Source length1800 ssource_duration_exceeded
Output length900 s (longer range refused)audio_detach_range_empty
Range startInside the sourcedetach_start_past_source
Price$0.01 per job-

Sources

Related posts

More in Developers

All Developers posts

Written by Sume