AD SPACE AVAILABLE · BRAND PARTNERS WELCOME

Integrating Kits AI API for Voice Conversion and Stem Separation: The Complete Developer Guide

William Sinykin · 365Finds Editorial
Indexed 88,650 Wiki articles

Put 365 Wiki to work with your AI

Copy the prompt below, paste it into the AI you already use, then ask your question.

Download full Skill

Try it with the prompt first. If you use 365 Wiki often, install the full 365Wiki Skill so you do not have to paste it again. No regular AI? Gemini or Microsoft Copilot on the web will work.

365Wiki Skill

Audio application developers, game sound designers, and digital multimedia teams integrating automated vocal pipelines face two major engineering hurdles: delivering high-fidelity voice conversion without intellectual property liability, and cleanly extracting stems from mixed audio before passing vocal streams to inference models. Kits AI solves both challenges through its REST API, offering ethically trained artist voice models and multi-instrument separation engines.

Integrating the Kits AI API requires understanding its multipart form data protocol, parameter tuning for pitch and dynamic response, and designing an asynchronous polling worker to emulate webhook notifications. Because Kits AI delivers output through signed URLs that expire within four hours, production pipelines must also incorporate immediate artifact archiving.


Architecture Overview and Authentication

The Kits AI platform provides RESTful endpoints hosted under the base URL:

https://arpeggi.io/api/kits/v1

All requests require HTTP Bearer token authentication in the request header:

Authorization: Bearer YOUR_API_KEY

API tokens are generated in the Kits AI user dashboard under the API Access section. Rate limits are enforced on an account level rather than per key:

Because audio transformation involves intensive compute, all Kits AI conversion and separation requests run as asynchronous background jobs. A successful submission immediately returns a job descriptor containing a unique id and a status (running, success, error, or cancelled).

+-----------------------------------------------------------------------------------+
|                              Client Audio Pipeline                                |
|  [Raw Input] --> [Backend Gateway] --(Transcode / Clean)--> [POST /voice-conversions]
+-----------------------------------------------------------------------------------+
                                                                     |
                                                                     v
                                                          +---------------------+
                                                          |   Kits AI Server    |
                                                          | (Inference Engine)  |
                                                          +---------------------+
                                                                     |
+--------------------------------------------------------------------+--------------+
|                              Async Polling & Dispatch Worker                      |
|  [Worker Loop] <-- GET /voice-conversions/{id} (Poll with backoff) | (Status check)
|        |                                                           |
|        +--(status == 'success')--> [Fetch 4h Signed S3 URL]        |
|        |                                                           |
|        +--> [Archive to Internal Storage (S3 / GCS)]               |
|        |                                                           |
|        +--> [Trigger Internal Webhook to Downstream App / DAW]     |
+-----------------------------------------------------------------------------------+

Programmatic Voice Conversion Pipeline

The Voice Conversion endpoint transforms vocal performance characteristics from an uploaded source file into a chosen target voice model.

Endpoint Specification

Core Parameters

ParameterTypeRequiredRange / OptionsEngineering Guidance
voiceModelIdNumberYesPositive IntegerTarget voice model ID (from GET /voice-models or custom clones).
soundFileFile / StreamYesWAV, MP3, FLAC (Max 100MB)24-bit 48kHz WAV uncompressed yields the lowest inference artifact rate.
conversionStrengthNumberNo0.0 to 1.0Accent intensity of target model; values above 0.85 can degrade pronunciation clarity.
modelVolumeMixNumberNo0.0 to 1.01.0 matches AI model volume envelope; 0.0 preserves input dynamic nuances.
pitchShiftNumberNo-24 to 24Semitone transposition. Shift by +12 or -12 when crossing gender registers.
preObjectNoJSON objectPre-inference DSP filters: NoiseGate, HighPassFilter, LowPassFilter, Compressor.
postObjectNoJSON objectPost-inference DSP effects: Chorus, Reverb, Compressor, Delay.

Voice Conversion Implementation (Python)

import json
import time
import requests

KITS_API_BASE = "https://arpeggi.io/api/kits/v1"
API_KEY = "YOUR_KITS_API_KEY"

def submit_voice_conversion(
    audio_file_path: str,
    voice_model_id: int,
    pitch_shift: int = 0,
    conversion_strength: float = 0.75,
    volume_mix: float = 0.5
) -> dict:
    url = f"{KITS_API_BASE}/voice-conversions"
    headers = {"Authorization": f"Bearer {API_KEY}"}

    pre_processing = {
        "NoiseGate": {
            "threshold_db": -42.0,
            "ratio": 3.0,
            "attack_ms": 10.0,
            "release_ms": 100.0
        },
        "HighPassFilter": {
            "cutoff_frequency_hz": 80.0
        }
    }

    data = {
        "voiceModelId": voice_model_id,
        "pitchShift": pitch_shift,
        "conversionStrength": conversion_strength,
        "modelVolumeMix": volume_mix,
        "pre": json.dumps(pre_processing)
    }

    with open(audio_file_path, "rb") as sound_stream:
        files = {"soundFile": sound_stream}
        response = requests.post(url, data=data, files=files, headers=headers)

    response.raise_for_status()
    return response.json()

Stem Separation and Vocal Isolation

Production workflows frequently feed polyphonic audio (such as mixed game audio or complete songs) into an AI pipeline. Converting vocals directly from an unseparated mix creates extreme distortion. Kits AI provides two purpose-built separation endpoints:

  1. Vocal Separation (POST /vocal-separations): Isolates a clean vocal lead track from backing tracks.
  2. Stem Splitter (POST /stem-splits): Splits master tracks into multi-instrument stems (vocals, drums, bass, and backing instruments).

Endpoint Differences and Parameters

Feature / AttributeVoice ConversionStem SplitterVocal Separation
Endpoint Path/voice-conversions/stem-splits/vocal-separations
Audio File FieldsoundFileinputFileinputFile
Max File Size100 MB50 MB50 MB
Supported FormatsWAV, MP3, FLACWAV, WEBM, MP3, FLACWAV, WEBM, MP3, FLAC
Output KeysoutputFileUrl, lossyOutputFileUrlstemFileUrls, vocalAudioFileUrlvocalAudioFileUrl, stemFileUrls

Stem Splitter Implementation (Node.js / TypeScript)

import axios from 'axios';
import fs from 'fs';
import FormData from 'form-data';

interface StemSplitResponse {
  id: number;
  status: 'running' | 'success' | 'error' | 'cancelled';
  vocalAudioFileUrl: string | null;
  stemFileUrls: Array<{ instrument: string; url: string }> | null;
}

export async function submitStemSplit(filePath: string, apiKey: string): Promise<StemSplitResponse> {
  const url = 'https://arpeggi.io/api/kits/v1/stem-splits';
  const form = new FormData();
  form.append('inputFile', fs.createReadStream(filePath));

  const response = await axios.post<StemSplitResponse>(url, form, {
    headers: {
      ...form.getHeaders(),
      Authorization: `Bearer ${apiKey}`,
    },
    maxContentLength: 50 * 1024 * 1024,
  });

  return response.data;
}

Designing the Asynchronous Webhook Emulation Worker

Kits AI does not currently accept a destination webhook callback URL in its request payloads. If your application or Digital Audio Workstation (DAW) plugin requires webhook-style notifications, you must build an intermediary worker service.

Polling Architecture Requirements

  1. Rate Limit Preservation: Never poll faster than once every 2 to 3 seconds. The account-wide limit is 1,000 GET requests per minute, which easily accommodates dozens of concurrent jobs if spaced correctly.
  2. Exponential Backoff with Jitter: For files exceeding two minutes in duration, increase the poll interval from 3 seconds up to 10 seconds.
  3. Download Lossless Audio Promptly: The returned signed URLs (outputFileUrl, vocalAudioFileUrl) expire after 4 hours. Your worker service must immediately download the lossless output file and upload it to your own Amazon S3, Google Cloud Storage, or private storage bucket before dispatching downstream events.

Python Async Poller & Webhook Dispatcher

import time
import requests
from typing import Optional

def poll_and_dispatch_job(
    job_id: int,
    job_type: str,  # "voice-conversions", "stem-splits", or "vocal-separations"
    api_key: str,
    internal_webhook_url: str,
    timeout_seconds: int = 300,
    interval_seconds: int = 3
) -> Optional[dict]:
    query_url = f"https://arpeggi.io/api/kits/v1/{job_type}/{job_id}"
    headers = {"Authorization": f"Bearer {api_key}"}
    start_time = time.time()

    while time.time() - start_time < timeout_seconds:
        response = requests.get(query_url, headers=headers)
        if response.status_code == 429:
            time.sleep(5)
            continue
        
        response.raise_for_status()
        job_data = response.json()
        status = job_data.get("status")

        if status == "success":
            # Extract target audio links
            lossless_url = job_data.get("outputFileUrl") or job_data.get("vocalAudioFileUrl")
            
            payload = {
                "event": f"{job_type}.completed",
                "jobId": job_id,
                "status": "success",
                "audioUrl": lossless_url,
                "fullResult": job_data
            }
            # Post directly to your application's downstream webhook
            requests.post(internal_webhook_url, json=payload, timeout=10)
            return job_data

        elif status in ("error", "cancelled"):
            requests.post(internal_webhook_url, json={
                "event": f"{job_type}.failed",
                "jobId": job_id,
                "status": status
            }, timeout=10)
            raise RuntimeError(f"Kits AI job {job_id} terminated with status: {status}")

        time.sleep(interval_seconds)

    raise TimeoutError(f"Job {job_id} did not complete within {timeout_seconds} seconds.")

365Finds Institutional Evaluation

365Finds evaluates Kits AI as a top-tier choice for commercial applications requiring vocal transformation, but engineering leads must weigh specific structural factors before production deployment.

Key Strengths

Trade-offs and Limitations

365Finds Recommendation

For studios and platforms building automated voice replacement, singing voice synthesizers, or multi-track remixers, Kits AI is our recommended engine over self-hosted open-source stacks when legal compliance and vocal fidelity are paramount. To deploy successfully:

  1. Always place a backend middleware service between client applications and Kits AI to safeguard API tokens and transcode input audio into clean, uncompressed WAV format.
  2. Prepend every voice conversion with high-pass filtering (80 Hz) and an aggressive noise gate (-42 dB) inside the API payload to eliminate background room noise that causes pitch-tracking artifacts.
  3. Automatically stream rendered files from the returned signed S3 links into long-term cloud object storage within the 4-hour validity window.

References