apicheats.dev elevenlabs/llms.txt Raw .md
POST

/v1/music/stem-separation

ElevenLabs API

Stem Separation

Base URL
https://api.elevenlabs.io
Auth
xi-api-key: <ELEVENLABS_API_KEY>
Last verified
2026-09-03 · upstream hash matched
Actions
Agents: curl -H "Accept: text/markdown" this URL
→ 223 tokens · Vary: Accept

Critical gotchas

Authentication uses the non-standard xi-api-key header, not Authorization: Bearer. Sending a Bearer token returns HTTP 401.

Text-to-speech responses are raw binary audio, not JSON. Write the body to a file (--output speech.mp3) rather than parsing it.

cURL

curl -X POST 'https://api.elevenlabs.io/v1/music/stem-separation?output_format=mp3_22050_32' \  -H "xi-api-key: $ELEVENLABS_API_KEY" \  -F 'file=@sample.bin' \  -F 'stem_variation_id=six_stems_v1' \  -F 'sign_with_c2pa=false'
Get a free ElevenLabs API key → sponsored

Parameters

Name In Type Required Description
output_format query string No Output format of the generated audio. Formatted as codec_sample_rate_bitrate. So an mp3 with 22.05kHz sample rate at 32kbs is represented as mp3_22050_32. MP3 with 192kbps bitrate requires you to be subscribed to Creator tier or above. PCM with 44.1kHz sample rate requires you to be subscribed to Pro tier or above. Note that the μ-law format (sometimes written mu-law, often approximated as u-law) is commonly used for Twilio audio inputs.
file body string Yes The audio file to separate into stems.
stem_variation_id body string No The id of the stem variation to use.
sign_with_c2pa body boolean No Whether to sign the generated song with C2PA. Applicable only for mp3 files.

Response 200 OK

"Binary ZIP file containing files like: vocals.mp3, drums.mp3, bass.mp3, guitar.mp3, piano.mp3, other.mp3"