Audio of a 15-second span: one detach range costs 1 cent, not 3

Need only the sound of seconds 40 to 55? Send one audio-detach job with a range for $0.01. Trimming first and then detaching costs $0.03.

4 min readSume
All posts

Send one audio-detach job with range: {start: 40, end: 55} and you get a 15-second audio file for $0.01. Trimming the video first and detaching afterwards is two jobs, $0.02 plus $0.01 = $0.03, and it makes an MP4 you did not need.

The shortcut works because audio detach accepts a range on the original video. The source video is not changed, and the output is a new audio artifact.

The two routes in numbers

Prices are the public rates in the Sume catalog and the docs pages, read 2026-10-09.

Cost of getting 15 seconds of audio from a 90-second video, as of 2026-10-09
RouteJobsArithmeticTotal
Detach with range1$0.01$0.01
Trim (exact), then detach2$0.02 + $0.01$0.03
Detach whole track, then split2$0.01 + $0.01$0.02

The request

range is { start, end? } in seconds. The default format is wav (pcm_s16le, sample-exact). Set format: "mp3" for a 128 kbps file. Import the clip first with POST /v1/media-imports so it sits on media.sume.com, send an Idempotency-Key header, then poll GET /v1/jobs/:id/status and read GET /v1/jobs/:id/result. The API rejects off-host URLs at admit, so a bad URL fails before any work runs.

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-span-001" \
  -d '{"video_url":"https://media.sume.com/artifacts/artf_demo/talk.mp4","range":{"start":40,"end":55},"format":"wav"}'

Limits that matter here

  • The source video can be up to 1800 s, but the output is capped at 900 s. A whole track longer than 900 s needs a range.
  • detach_source_has_no_audio is returned for a silent video. Run video inspect with frames: false first and read probe.has_audio if you are not sure.
  • detach_start_past_source is returned when range.start is beyond the probed duration.
  • The video is never re-encoded: detach uses worker ffmpeg only, with no provider inference.

When trim plus detach is still right

Use the two-step route only when you need the same 15 seconds as both a picture and a sound. Then the trim job gives you the MP4 and you detach from that short file. If you need many ranges from one recording, detach once and slice the audio with the timeline audio split operation instead of paying for a range detach each time.

A worked batch

At scale the difference compounds. Suppose you pull a 15-second hook sound from each of 300 episodes. One detach with a range per episode is 300 x $0.01 = $3.00. Trim then detach is 300 x $0.03 = $9.00. Detaching each whole track and splitting is 300 x $0.02 = $6.00, and only pays off when you want several ranges from the same episode. The break-even: if you need three or more ranges from one source, detach the whole track once and split it, because one split job takes up to 20 ranges for $0.01 (1 detach + 1 split = $0.02, versus $0.03 for three range detaches). Every media job follows the same lifecycle: submit with an Idempotency-Key, receive a job, poll GET /v1/jobs/:id/status until it is ready, then read GET /v1/jobs/:id/result. A retry with the same key does not queue a second job, so a network error during submit never doubles a charge.

Sources

Related posts

More in Media tools

All Media tools posts

Written by Sume