Extract audio segment start beyond video length: error and fix
Audio detach fails detach_start_past_source when range.start is past the probed duration. It differs from audio_detach_range_empty. Check duration first.

detach_start_past_source means range.start is later than the video's actual length. It is raised by the worker after it probes the file, which is why a request with a normal-looking range can still fail it. audio_detach_range_empty is a different mistake: range.end at or before range.start, or a range longer than 900 seconds.
Codes are from the audio detach docs, read 2026-10-01. HeyGen's Speech Cleanup post, read the same day, describes removing filler words, pauses and retakes from a recording; if you are pulling out audio ranges for a similar job, check them against the clip length first.
How do the two range errors differ?
Both involve range, an optional { start, end? } in seconds. end is open-ended when omitted, and omitting range takes the whole track.
| Code | When | Where it is raised |
|---|---|---|
audio_detach_range_empty | range.end at or before range.start, or longer than 900 s | Request check |
detach_start_past_source | range.start past the probed duration | Worker |
detach_source_has_no_audio | Source has no audio track | Worker |
source_duration_exceeded | Source longer than 1800 s | Worker |
How do I find the clip length first?
Run video inspect with frames: false, which the detach docs say is enough to read probe.has_audio, and read the probed duration before choosing a range. A finished detach also reports source_duration_seconds, so you can compare after the fact. If your start is past the end, correct it or take the whole track by leaving range out.
What does a valid range request look like?
Output is capped at 900 seconds, so a whole track past 900 s needs a range anyway.
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-range-001" \
-d '{
"video_url": "https://media.sume.com/artifacts/artf_demo/talk.mp4",
"range": { "start": 30, "end": 90 }
}'What if I only know the start?
Leave end off and the range runs to the end of the track, up to the 900-second output cap. See audio detach range over 900 seconds for the other end of the limit.
Sources
Related posts
More in Developers
- Devin Desktop ACP session/new mcp_servers with Sume's remote URL
Devin Desktop 3.10.35 uses MCP servers an ACP client passes in session/new. Pass Sume's streamable HTTP URL and an API-key header, not editor config.
- ElevenLabs API timeout: cascade_timeout_seconds vs Sume waits
ElevenLabs added cascade_timeout_seconds (2-15 s) for Speech Engine retries. Sume's wait_timeout_seconds is a different knob: a 0-30 s HTTP wait on a job.
- ElevenLabs CLI 1.0: scripting audio with Sume over plain HTTP
ElevenLabs CLI v1.0.0 turns every API operation into a subcommand. For Sume audio, script curl against /v1/jobs and join clips for $0.01 flat per job.
- ElevenLabs API cursor pagination, and how Sume pages lists
ElevenLabs added a cursor-paginated phone number endpoint. Sume list routes use keyset pages: pass next_cursor back as cursor until has_more is false.
Written by Sume