Split audio into stems

May 15, 2025

Table of contents

  1. Request Headers
  2. Query Parameters
  3. Responses
  4. Model
  5. Examples
  6. Try It

Upload an audio file (MP3, WAV, M4A, FLAC) and split it into separate instrument stems (vocals, drums, bass, etc).

POST raw content using Make.com and similar nocode tools.

https://api.useapi.net/v1/tempolor/music/stems-splitter/?…

Request Headers
Authorization: Bearer {API token}
Content-Type: select from the table below
  • API token is required, see Setup useapi.net for details.
  • Content-Type is required, select from the table below:
Content-Type File Extension
audio/mpeg mp3
audio/wav wav
audio/wave wav
audio/mp4 m4a
audio/x-m4a m4a
audio/flac flac
audio/x-flac flac
Query Parameters
  • user_id is optional when only one account configured. However, if you have multiple accounts configured, this parameter becomes required.
Responses
  • 200 OK

    When the response includes stemsZipUrl, the processing is complete and you can download the ZIP file containing the separated stems.

    {
        "state": 2,
        "title": "audio_file.mp3",
        "stemsZipUrl": "https://example.com/path/to/stems.zip"
    }
    
  • 400 Bad Request

    The server encountered an error processing your request.

    {
        "error": "<Error message>",
        "code": 400
    }
    
  • 401 Unauthorized

    {
      "error": "Unauthorized",
      "code": 401
    }
    
Model
{ // TypeScript, all fields are optional
  state: number
  title: string
  stemsZipUrl: string  // URL to download the zip with separated stems
  audioType: string 
  detail: string[] 
  error: string
  code: number
}
Examples
  • curl "https://api.useapi.net/v1/tempolor/music/stems-splitter/?user_id=<user_id>" \
      -H "Authorization: Bearer …" \
      -H "Content-Type: audio/mpeg" \
      --data-binary @/path/to/your/audio-track.mp3
    
  • const token = "API token";
    const user_id = "Previously configured account"; 
    const apiUrl = `https://api.useapi.net/v1/tempolor/music/stems-splitter/?user_id=${user_id}`; 
    let blob;
    /*
        // Example 1: Fetch audio from URL
        const audioUrl = "https://example.com/path/to/audio-track.mp3";
        const responseAudio = await fetch(audioUrl);
        blob = await responseAudio.blob();
    */
    /* 
        // Example 2: Load audio from local file (Blob)
        const fsp = require('fs').promises;
        const audioFileName = "./audio-track.mp3";
        blob = new Blob([await fsp.readFile(audioFileName)]);
    */
    /*
        // Example 3: Load from input file html element
        // <input id="audio-file" type="file"> 
        const audioFile = document.getElementById(`audio-file`);
        if (audioFile.files[0])
            blob = audioFile.files[0];
    */
    
    // Upload the audio file for stem splitting
    const response = await fetch(apiUrl, {
      method: "POST",
      headers: {
        "Authorization": `Bearer ${token}`,
        "Content-Type": "audio/mpeg"
      },
      body: blob
    });
    
    const result = await response.json();
    console.log("response", {response, result});
    
  • import requests
    import time
    
    token = "API token"
    user_id = "Previously configured account"
    apiUrl = f"https://api.useapi.net/v1/tempolor/music/stems-splitter/?user_id={user_id}"
    headers = {
        'Authorization': f'Bearer {token}',
        'Content-Type': 'audio/mpeg'
    }
    
    # # Example 1: Fetch audio from URL
    # import requests
    # audio_url = "https://example.com/path/to/audio-track.mp3"
    # response_audio = requests.get(audio_url)
    # file_content = response_audio.content
    
    # # Example 2: Load audio from local file
    audio_file_path = "./audio-track.mp3"
    with open(audio_file_path, 'rb') as audio_file:
        file_content = audio_file.read()
    
    response = requests.post(apiUrl, headers=headers, data=file_content)
    result = response.json()
    print(response.status_code, result)
    
Try It