Documentation Index Fetch the complete documentation index at: https://docs.audiopod.ai/llms.txt
Use this file to discover all available pages before exploring further.
Overview
AudioPod AI’s Stem Separation API uses state-of-the-art AI models to separate mixed audio recordings into individual components (stems). Extract vocals, drums, bass, guitar, piano, and more from any song.
Key Features
Granular Separation : Single, two, four, six, eight(producer), twelve(studio), sixteen(mastering)
File Upload & URL Support : Process local files or YouTube/SoundCloud URLs
Quality Scores : Get AI-assessed quality metrics for each stem
Presigned Downloads : Direct S3 URLs for fast stem downloads
Installation
Authentication
Get your API key from the API Keys Dashboard .
from audiopod import AudioPod
client = AudioPod( api_key = "ap_your_api_key" )
# Or set AUDIOPOD_API_KEY environment variable
import AudioPod from 'audiopod' ;
const client = new AudioPod ({ apiKey: 'ap_your_api_key' });
// Or set AUDIOPOD_API_KEY environment variable
export AUDIOPOD_API_KEY = "ap_your_api_key"
# Use -H "X-API-Key: $AUDIOPOD_API_KEY" in requests
Separation Modes
Mode Stems Output Use Case single1 Specified stem only Vocal isolation, drum extraction two2 vocals + instrumental Karaoke tracks four4 vocals, drums, bass, other Standard remixing six6 + guitar, piano Full instrument separation producer8 + kick, snare, hihat Beat production studio12 + cymbals, sub_bass, synth Professional mixing mastering16 Maximum detail Forensic analysis
Quick Start
Six-Stem Separation
from audiopod import AudioPod
client = AudioPod( api_key = "ap_your_api_key" )
# Extract and wait for completion
result = client.stems.separate(
url = "https://youtube.com/watch?v=VIDEO_ID" ,
mode = "six"
)
# Download stems
print ( "Stems ready:" )
for stem, url in result[ "download_urls" ].items():
print ( f " { stem } : { url[: 60 ] } ..." )
import AudioPod from 'audiopod' ;
const client = new AudioPod ({ apiKey: 'ap_your_api_key' });
// Extract and wait for completion
const result = await client . stems . separate ({
url: 'https://youtube.com/watch?v=VIDEO_ID' ,
mode: 'six'
});
// Download stems
console . log ( 'Stems ready:' );
for ( const [ stem , url ] of Object . entries ( result . download_urls )) {
console . log ( ` ${ stem } : ${ url . substring ( 0 , 60 ) } ...` );
}
# Submit job
curl -X POST "https://api.audiopod.ai/api/v1/stem-extraction/api/extract" \
-H "X-API-Key: $AUDIOPOD_API_KEY " \
-F "url=https://youtube.com/watch?v=VIDEO_ID" \
-F "mode=six"
# Check status (replace JOB_ID)
curl -X GET "https://api.audiopod.ai/api/v1/stem-extraction/status/JOB_ID" \
-H "X-API-Key: $AUDIOPOD_API_KEY "
Examples by Mode
Four-Stem Separation (Standard)
Extract vocals, drums, bass, and other.
Python (URL)
Python (File)
Node.js (URL)
Node.js (File)
cURL (URL)
cURL (File)
from audiopod import AudioPod
client = AudioPod( api_key = "ap_your_api_key" )
result = client.stems.separate(
url = "https://youtube.com/watch?v=VIDEO_ID" ,
mode = "four"
)
print ( f "Vocals: { result[ 'download_urls' ][ 'vocals' ] } " )
print ( f "Drums: { result[ 'download_urls' ][ 'drums' ] } " )
print ( f "Bass: { result[ 'download_urls' ][ 'bass' ] } " )
print ( f "Other: { result[ 'download_urls' ][ 'other' ] } " )
from audiopod import AudioPod
client = AudioPod( api_key = "ap_your_api_key" )
result = client.stems.separate(
file = "/path/to/song.mp3" ,
mode = "four"
)
for stem, url in result[ "download_urls" ].items():
print ( f " { stem } : { url } " )
import AudioPod from 'audiopod' ;
const client = new AudioPod ({ apiKey: 'ap_your_api_key' });
const result = await client . stems . separate ({
url: 'https://youtube.com/watch?v=VIDEO_ID' ,
mode: 'four'
});
console . log ( `Vocals: ${ result . download_urls . vocals } ` );
console . log ( `Drums: ${ result . download_urls . drums } ` );
console . log ( `Bass: ${ result . download_urls . bass } ` );
console . log ( `Other: ${ result . download_urls . other } ` );
import AudioPod from 'audiopod' ;
const client = new AudioPod ({ apiKey: 'ap_your_api_key' });
const result = await client . stems . separate ({
file: '/path/to/song.mp3' ,
mode: 'four'
});
for ( const [ stem , url ] of Object . entries ( result . download_urls )) {
console . log ( ` ${ stem } : ${ url } ` );
}
curl -X POST "https://api.audiopod.ai/api/v1/stem-extraction/api/extract" \
-H "X-API-Key: $AUDIOPOD_API_KEY " \
-F "url=https://youtube.com/watch?v=VIDEO_ID" \
-F "mode=four"
curl -X POST "https://api.audiopod.ai/api/v1/stem-extraction/api/extract" \
-H "X-API-Key: $AUDIOPOD_API_KEY " \
-F "file=@/path/to/song.mp3" \
-F "mode=four"
from audiopod import AudioPod
client = AudioPod( api_key = "ap_your_api_key" )
# Extract only vocals
result = client.stems.separate(
url = "https://youtube.com/watch?v=VIDEO_ID" ,
mode = "single" ,
stem = "vocals" # Options: vocals, drums, bass, guitar, piano, other
)
print ( f "Vocals: { result[ 'download_urls' ][ 'vocals' ] } " )
import AudioPod from 'audiopod' ;
const client = new AudioPod ({ apiKey: 'ap_your_api_key' });
// Extract only vocals
const result = await client . stems . separate ({
url: 'https://youtube.com/watch?v=VIDEO_ID' ,
mode: 'single' ,
stem: 'vocals' // Options: vocals, drums, bass, guitar, piano, other
});
console . log ( `Vocals: ${ result . download_urls . vocals } ` );
curl -X POST "https://api.audiopod.ai/api/v1/stem-extraction/api/extract" \
-H "X-API-Key: $AUDIOPOD_API_KEY " \
-F "url=https://youtube.com/watch?v=VIDEO_ID" \
-F "mode=single" \
-F "stem=vocals"
Two-Stem Separation (Karaoke)
Separate vocals from instrumental.
from audiopod import AudioPod
client = AudioPod( api_key = "ap_your_api_key" )
result = client.stems.separate(
url = "https://youtube.com/watch?v=VIDEO_ID" ,
mode = "two"
)
# Returns: vocals + no_vocals (instrumental)
print ( f "Vocals: { result[ 'download_urls' ][ 'vocals' ] } " )
print ( f "Instrumental: { result[ 'download_urls' ][ 'no_vocals' ] } " )
import AudioPod from 'audiopod' ;
const client = new AudioPod ({ apiKey: 'ap_your_api_key' });
const result = await client . stems . separate ({
url: 'https://youtube.com/watch?v=VIDEO_ID' ,
mode: 'two'
});
// Returns: vocals + no_vocals (instrumental)
console . log ( `Vocals: ${ result . download_urls . vocals } ` );
console . log ( `Instrumental: ${ result . download_urls . no_vocals } ` );
curl -X POST "https://api.audiopod.ai/api/v1/stem-extraction/api/extract" \
-H "X-API-Key: $AUDIOPOD_API_KEY " \
-F "url=https://youtube.com/watch?v=VIDEO_ID" \
-F "mode=two"
Producer Mode (8 Stems with Drum Kit)
from audiopod import AudioPod
client = AudioPod( api_key = "ap_your_api_key" )
result = client.stems.separate(
url = "https://youtube.com/watch?v=VIDEO_ID" ,
mode = "producer"
)
# Returns: vocals, kick, snare, hihat, bass, guitar, piano, other
for stem, url in result[ "download_urls" ].items():
print ( f " { stem } : { url[: 60 ] } ..." )
import AudioPod from 'audiopod' ;
const client = new AudioPod ({ apiKey: 'ap_your_api_key' });
const result = await client . stems . separate ({
url: 'https://youtube.com/watch?v=VIDEO_ID' ,
mode: 'producer'
});
// Returns: vocals, kick, snare, hihat, bass, guitar, piano, other
for ( const [ stem , url ] of Object . entries ( result . download_urls )) {
console . log ( ` ${ stem } : ${ url . substring ( 0 , 60 ) } ...` );
}
curl -X POST "https://api.audiopod.ai/api/v1/stem-extraction/api/extract" \
-H "X-API-Key: $AUDIOPOD_API_KEY " \
-F "url=https://youtube.com/watch?v=VIDEO_ID" \
-F "mode=producer"
Advanced Usage
Async Job Handling
For more control, use extract() and wait_for_completion() separately:
from audiopod import AudioPod
client = AudioPod( api_key = "ap_your_api_key" )
# Submit job (returns immediately)
job = client.stems.extract(
url = "https://youtube.com/watch?v=VIDEO_ID" ,
mode = "six"
)
print ( f "Job submitted: { job[ 'id' ] } " )
# Do other work...
# Wait for completion when ready
result = client.stems.wait_for_completion(job[ "id" ], timeout = 600 )
if result[ "status" ] == "COMPLETED" :
print ( "Download URLs:" )
for stem, url in result[ "download_urls" ].items():
print ( f " { stem } : { url } " )
import AudioPod from 'audiopod' ;
const client = new AudioPod ({ apiKey: 'ap_your_api_key' });
// Submit job (returns immediately)
const job = await client . stems . extract ({
url: 'https://youtube.com/watch?v=VIDEO_ID' ,
mode: 'six'
});
console . log ( `Job submitted: ${ job . id } ` );
// Do other work...
// Wait for completion when ready
const result = await client . stems . waitForCompletion ( job . id , 600000 );
if ( result . status === 'COMPLETED' ) {
console . log ( 'Download URLs:' );
for ( const [ stem , url ] of Object . entries ( result . download_urls )) {
console . log ( ` ${ stem } : ${ url } ` );
}
}
Get Available Modes
from audiopod import AudioPod
client = AudioPod( api_key = "ap_your_api_key" )
modes = client.stems.modes()
print ( "Available modes:" )
for m in modes[ "modes" ]:
print ( f " { m[ 'mode' ] } : { m[ 'description' ] } ( { m[ 'stem_count' ] } stems)" )
import AudioPod from 'audiopod' ;
const client = new AudioPod ({ apiKey: 'ap_your_api_key' });
const modes = await client . stems . modes ();
console . log ( 'Available modes:' );
modes . modes . forEach ( m => {
console . log ( ` ${ m . mode } : ${ m . description } ( ${ m . stem_count } stems)` );
});
curl -X GET "https://api.audiopod.ai/api/v1/stem-extraction/modes"
Check Job Status
from audiopod import AudioPod
client = AudioPod( api_key = "ap_your_api_key" )
status = client.stems.status( 5512 )
print ( f "Status: { status[ 'status' ] } " )
if status[ "status" ] == "COMPLETED" :
print ( "Quality scores:" )
for stem, score in status[ "quality_scores" ].items():
print ( f " { stem } : { score :.2f} " )
import AudioPod from 'audiopod' ;
const client = new AudioPod ({ apiKey: 'ap_your_api_key' });
const status = await client . stems . status ( 5512 );
console . log ( `Status: ${ status . status } ` );
if ( status . status === 'COMPLETED' ) {
console . log ( 'Quality scores:' );
for ( const [ stem , score ] of Object . entries ( status . quality_scores )) {
console . log ( ` ${ stem } : ${ score . toFixed ( 2 ) } ` );
}
}
curl -X GET "https://api.audiopod.ai/api/v1/stem-extraction/status/5512" \
-H "X-API-Key: $AUDIOPOD_API_KEY "
Completed Job Response:
{
"id" : 5512 ,
"status" : "COMPLETED" ,
"source_type" : "URL" ,
"stem_paths" : {
"vocals" : "stems/5512/vocals.wav" ,
"drums" : "stems/5512/drums.wav" ,
"bass" : "stems/5512/bass.wav" ,
"guitar" : "stems/5512/guitar.wav" ,
"piano" : "stems/5512/piano.wav" ,
"other" : "stems/5512/other.wav"
},
"quality_scores" : {
"vocals" : 0.64 ,
"drums" : 0.35 ,
"bass" : 0.87 ,
"guitar" : 0.38 ,
"piano" : 0.0 ,
"other" : 0.36
},
"download_urls" : {
"vocals" : "https://media.audiopod.ai/..." ,
"drums" : "https://media.audiopod.ai/..." ,
"bass" : "https://media.audiopod.ai/..." ,
"guitar" : "https://media.audiopod.ai/..." ,
"piano" : "https://media.audiopod.ai/..." ,
"other" : "https://media.audiopod.ai/..."
},
"completed_at" : "2025-12-11T12:39:37.379848"
}
Pricing
Rate: $0.10 per minute of audio processed (all modes)
Duration Cost 3 minutes $0.31 5 minutes $0.50 10 minutes $1.00 1 hour $6.00
Error Handling
from audiopod import AudioPod, InsufficientBalanceError, AuthenticationError
try :
client = AudioPod( api_key = "ap_..." )
result = client.stems.separate( url = "..." , mode = "six" )
except AuthenticationError:
print ( "Invalid API key" )
except InsufficientBalanceError as e:
print ( f "Need $ { e.required_cents / 100 :.2f} , have $ { e.available_cents / 100 :.2f} " )
except ValueError as e:
print ( f "Invalid input: { e } " )
import AudioPod , { InsufficientBalanceError , AuthenticationError } from 'audiopod' ;
try {
const client = new AudioPod ({ apiKey: 'ap_...' });
const result = await client . stems . separate ({ url: '...' , mode: 'six' });
} catch ( error ) {
if ( error instanceof AuthenticationError ) {
console . log ( 'Invalid API key' );
} else if ( error instanceof InsufficientBalanceError ) {
console . log ( `Need $ ${ error . requiredCents / 100 } , have $ ${ error . availableCents / 100 } ` );
} else {
console . log ( `Error: ${ error . message } ` );
}
}
Status Codes
Status Description PENDINGJob queued, waiting for worker PROCESSINGStem separation in progress COMPLETEDSuccess - download URLs available FAILEDError occurred - check error_message
Next Steps
API Wallet Manage billing and view usage history.
Noise Reduction Clean up stems for better quality.