Endpoint
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
audio_url | string | Optional | URL of the audio file to extract from. Either audio_url or audio_file must be provided. |
audio_file | UploadFile | Optional | Audio file to upload and process. Either audio_url or audio_file must be provided. |
stems | string | Optional | JSON string list of required stems. e.g., ["vocals", "drums"] . See all options below. |
preprocessing_options | string | Optional | JSON string list of preprocessing options. e.g., ["Denoise"] . See all options below. |
webhook_url | string | Optional | Callback URL to receive async processing results. |
Available Stems
The following audio stems can be extracted. They are grouped into categories based on instrument type or function:Vocals
vocals
— All vocal content (combined)male_vocal
— Male vocals onlyfemale_vocal
— Female vocals onlylead_vocal
— Lead singer’s voiceback_vocal
— Backing vocals
Guitar
guitar
— All guitar soundsacoustic_guitar
— Acoustic guitarelectric_guitar
— Electric guitarrhythm_guitar
— Rhythm guitar partssolo_guitar
— Solo guitar parts
Drums
drums
— All drum elementskick_drum
— Kick or bass drumsnare_drum
— Snare drumtoms
— Tom drumshi_hat
— Hi-hat cymbalsride
— Ride cymbalcrash
— Crash cymbal
Keys and Piano
piano
— Piano onlykeys
— Keyboard instruments (includes synths, organs, etc.)
Strings and Winds
strings
— String instruments (e.g., violin, cello)winds
— Wind instruments (e.g., saxophone, flute)
Other Instruments
bass
— Bassline instrumentsinstrumental
— All non-vocal content (used to get instrumental version)
Full Band (Composite)
drums
,bass
,piano
,guitar
— Common full-band instrumentation
Note: If thestems
parameter is omitted or an empty list is supplied, this full band composite (["drums", "bass", "piano", "guitar"]
) is used as the default.
Preprocessing Options
These preprocessing steps can be applied to the input audio before stem extraction:Denoise
— Reduces ambient or background noiseDeecho
— Removes echo and early reflectionsDereverb
— Reduces late reverberation from recordings
Sample Output
Sample Output : Vocals Download Audio Sample Output : instrumentals Download AudioSample Request
cURL
Python
🔐 Replacepath_to_audio.mp3
,api_key
, andwebhook_url
with actual values.
Sample Response
Success (200 OK)
Webhook Response
Success (200 OK)
Common Errors
- 422 Unprocessable Entity: When neither
audio_url
noraudio_file
is provided. - 500 Internal Server Error: A server-side error occurred.
Payload and Request Formation
Authorizations
Body
The URL of the audio file to process.
"https://www.youtube.com/watch?v=jGflUbPQfW8"
Audio file to upload and process.
JSON string list of required output stems. Available options: vocals, instrumental, male_vocal, female_vocal, lead_vocal, back_vocal, bass, drums, guitar, piano, keys, strings, winds, rhythm_guitar, solo_guitar, acoustic_guitar, electric_guitar, kick_drum, snare_drum, toms, hi_hat, ride, crash.
"[\"vocals\", \"drums\"]"
JSON string list of preprocessing steps. Available options: Denoise, Deecho, Dereverb.
"[\"Denoise\", \"Dereverb\"]"
Callback URL for async processing.
"http://webhook.musicgpt.com"