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.

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.
| Format | Bytes per second | 90 s | Cost |
|---|---|---|---|
| wav, 48 kHz stereo | 48,000 x 2 x 2 = 192,000 | 17.28 MB | $0.01 |
| wav, 44.1 kHz stereo | 44,100 x 2 x 2 = 176,400 | 15.88 MB | $0.01 |
| wav, 16 kHz mono (STT shape) | 16,000 x 1 x 2 = 32,000 | 2.88 MB | $0.01 |
| mp3, 128 kbps | 16,000 | 1.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 | wav 48 kHz stereo | mp3 128 kbps |
|---|---|---|
| 0-30 s | 5.76 MB | 0.48 MB |
| 0-60 s | 11.52 MB | 0.96 MB |
| 0-90 s | 17.28 MB | 1.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
- Five caption looks on one clip: one transcription, four restyles
Test five caption styles on one video for $1.00: the first job transcribes, four source_caption_id restyles reuse the word timings. Request bodies included.
- video-frames fps limit: 24 frames, fps up to 2, what it covers
Sume video-frames takes fps from just above 0 up to 2 and caps each call at 24 frames at mid-bin times. Table of sample times and the span 24 frames reach.
- Video filter /check is free: validate 8 ops before you pay $0.02
POST /v1/video-filter/check runs the same validation as the encode and bills nothing. See what it catches, the 8-op limit, and when a valid program still fails.
- Omni edit loop on Sume: three instructions, three jobs, about $3.00
Editing a clip with Gemini Omni one instruction at a time is one Sume job per pass. If each pass returns 8 s at 720p, three passes cost $3.00.
Written by Sume