Extract the first 90 seconds of a video's audio: audio-detach range

Send audio-detach range {start 0, end 90} for $0.01: 17.28 MB as 48 kHz stereo wav or 1.44 MB as 128 kbps mp3, a Shorts Audio Library song's 90 s.

5 min readSume
All posts

Call POST /v1/audio-detach with range: { start: 0, end: 90 } to get just the first 90 seconds of a video's audio as a new file for $0.01. As 48 kHz stereo wav (the default pcm_s16le) it is 17.28 MB; as 128 kbps mp3 it is 1.44 MB. Ninety seconds is also the length for which YouTube lets a Shorts Audio Library song play in a three-minute Short (page read 2026-10-08), so the same figure is useful for a music-length check.

The sizes

Wav size is sample rate x channels x 2 bytes x seconds. mp3 at 128 kbps is 16,000 bytes a second. The sample rate and channels depend on the source unless you set sample_rate and channels; the table assumes a 48 kHz stereo source.

Audio detach of 90 s by format (arithmetic as of 2026-10-08)
FormatBytes per second90 sCost
wav, 48 kHz stereo48,000 x 2 x 2 = 192,00017.28 MB$0.01
wav, 44.1 kHz stereo44,100 x 2 x 2 = 176,40015.88 MB$0.01
wav, 16 kHz mono (STT shape)16,000 x 1 x 2 = 32,0002.88 MB$0.01
mp3, 128 kbps16,0001.44 MB$0.01

The call

range.end is optional; leave it out and the range is open-ended. A range longer than 900 seconds, or with end <= start, returns audio_detach_range_empty. The source can be up to 1,800 seconds, and the output up to 900.

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

The shorter song limits

The YouTube page says some Audio Library songs are limited to 60 or 30 seconds, so the same range call can test the three lengths. Wav sizes assume 48 kHz stereo and mp3 is 128 kbps.

Range length against file size (arithmetic as of 2026-10-08)
Rangewav 48 kHz stereomp3 128 kbps
0-30 s5.76 MB0.48 MB
0-60 s11.52 MB0.96 MB
0-90 s17.28 MB1.44 MB

Many windows from one track

If you need several windows, detach the whole track once (up to 900 seconds of output without a range), and then split it with timeline audio, which takes up to 20 ranges in one job. That is $0.01 for the detach plus the split job, and not one detach for each window.

Reading the result

The result has audio_url, duration_seconds, format, channels, sample_rate, source_duration_seconds and the range you asked for. sample_rate is null when you did not set it, since the value comes from the source. If the source has no audio track the job fails with detach_source_has_no_audio, and range.start past the source end returns detach_start_past_source. Both are worker errors, so check probe.has_audio first with video_inspect and frames: false to save the call.

  • Use wav for a spine in Timeline 1.0 (audio.url) or for speech to text.
  • Use mp3 when you only need to listen or to share the 90 seconds.
  • Keep the Short itself under three minutes and a song within the Audio Library limit that applies to that song: some are limited to 60 or 30 seconds.

Sources

Related posts

More in Media tools

All Media tools posts

Written by Sume