Developers / SDKs / Python

Python에서 스템 분리.

Python 서비스에서 12줄로 스템 분리를 출시하세요. GPU도, 모델 다운로드도, FFmpeg도 필요 없습니다. PyPI의 typed client, 이 페이지의 FastAPI 및 Flask webhook handlers, 그리고 이미 신뢰하는 동일한 htdemucs_ft 모델을 사용합니다.

$pip install aistemsplitter
v0.1.0GitHubPyPI
API 키 받기API 문서 읽기

이 페이지에서

  1. 01설치
  2. 02인증
  3. 03Hello world
  4. 04메서드
  5. 05Webhooks
  6. 06다음 단계
/ install

설치

$pip install aistemsplitter
/ authenticate

인증

developer settings 페이지에서 키를 발급한 뒤 AISTEMSPLITTER_API_KEY로 export하면 client가 자동으로 읽습니다. 요청마다 다른 키가 필요할 때만 constructor에 api_key=를 전달하세요. env var가 권장 기본값입니다.

txt
import os
from aistemsplitter import AiStemSplitter

client = AiStemSplitter(api_key=os.environ["AISTEMSPLITTER_API_KEY"])
/ hello world

Hello world

imports부터 디스크의 4개 스템까지 12줄입니다. htdemucs_ft에 job을 제출하고 완료될 때까지 폴링한 뒤, vocals.wav, drums.wav, bass.wav, other.wav를 스크립트 옆에 씁니다. 복사하고, 붙여 넣고, 실행하세요.

txt
import os
import requests
from aistemsplitter import AiStemSplitter

client = AiStemSplitter(api_key=os.environ["AISTEMSPLITTER_API_KEY"])

# 1. Submit a split job
job = client.create_split(
    input={"type": "direct_url", "url": "https://example.com/song.mp3"},
    stem_model="htdemucs_ft",
)

# 2. Wait until completion (polls under the hood)
result = client.wait_for_split(job.id)

# 3. Download all six stems to disk
for name, url in result.stems.items():
    with requests.get(url, stream=True) as r:
        with open(f"./{name}.wav", "wb") as f:
            for chunk in r.iter_content(chunk_size=8192):
                f.write(chunk)
/ methods

메서드

전체 SDK surface는 1분 안에 훑어볼 수 있는 4개의 typed methods입니다 — submit, get, wait, download. 각 메서드는 하나의 REST endpoint를 그대로 반영하므로 typed wrapper를 넘어설 때마다 /developers/api를 통해 raw HTTP로 내려갈 수 있습니다. 노출된 models: htdemucs_ft, htdemucs, htdemucs_6s. 만료되지 않는 크레딧 팩에서 분당 $0.08~$0.14로 과금됩니다.

createSplit(input)
README

새 split job을 제출하고 job id와 queued status를 반환합니다.

getSplit(id)
README

split job의 현재 status를 가져옵니다.

waitForSplit(id, timeout_s=600)
README

job이 성공, 실패하거나 timeout이 지날 때까지 폴링합니다.

listSplits(query=None)
README

API 키의 최근 split jobs를 paginated list로 반환합니다.

presignUpload(filename)
README

직접 browser/server uploads를 위한 pre-signed PUT URL을 받습니다.

verifyWebhook(headers, raw_body)
README

수신 webhook payload의 HMAC-SHA256 signature를 검증합니다.

/ webhooks

Webhooks

production에서는 polling loop를 건너뛰세요. submit에 webhook_url을 설정한 뒤, 들어오는 POST의 HMAC signature를 검증하고 body에서 presigned stem URLs를 바로 읽으세요. FastAPI와 Flask handlers가 같은 페이지에 있습니다.

txt
import os
from fastapi import FastAPI, Request, HTTPException
from aistemsplitter import AiStemSplitter

app = FastAPI()
client = AiStemSplitter(api_key=os.environ["AISTEMSPLITTER_API_KEY"])

@app.post("/webhooks/aistemsplitter")
async def handle_webhook(request: Request):
    raw = await request.body()
    try:
        event = client.verify_webhook(request.headers, raw)
    except Exception:
        raise HTTPException(status_code=400, detail="invalid signature")

    if event.type == "split.succeeded":
        # event.data["stems"] -> six URLs
        pass
    elif event.type == "split.failed":
        # event.data["error"] -> { code, message }
        pass
    return {"ok": True}
/ frequently asked

FAQ

  • Should I use the sync client or the async one?

    Default to sync (StemSplitter) — that's what the 12-line hello world uses, and it's what fits naturally inside a Django view or a Celery task. Switch to AsyncStemSplitter when you're already on FastAPI, Starlette, or asyncio in a notebook: the method names match (await client.submit, await client.wait, await client.download), so swapping costs one import + one await per call.

  • Does it work with FastAPI and Flask?

    Yes — both are first-class. The Webhooks section above ships runnable handlers for each: FastAPI uses async def webhook(request: Request) with verify_signature; Flask uses a sync @app.post route. Both verify HMAC-SHA256 with one import (from aistemsplitter import verify_signature) and unpack presigned stem URLs from the JSON body without extra parsing.

  • How do I install in a virtualenv or Poetry project?

    Standard tooling: `python -m venv .venv && source .venv/bin/activate && pip install aistemsplitter` for venv; `poetry add aistemsplitter` for Poetry; `uv add aistemsplitter` for uv. The package is pure-Python wheels (no native compilation), so installation completes in seconds on every platform — no pyenv shim, no FFmpeg pre-step, no GPU driver.

  • Will hosted output match my local htdemucs_ft quality?

    Yes. We expose the same model file the open-source community trusts — htdemucs_ft, plus htdemucs and htdemucs_6s — so output is bit-comparable to a local Demucs run with the same model + same input, modulo our managed inference settings (batch size, precision). Pass model='htdemucs_6s' on submit when you need guitar and piano stems.

  • What if I outgrow the typed SDK and need raw HTTP?

    Drop straight to /developers/api. The SDK is a thin typed wrapper over the same REST endpoints the curl quickstart calls, so the auth header (Authorization: Bearer ast_live_…), the webhook signature scheme (HMAC-SHA256 in aistemsplitter-signature), and the response shapes are identical. You can mix-and-match — call submit via the SDK, fetch status via raw httpx for a custom retry policy.

  • How do I handle very long audio without timing out?

    Two strategies. (1) Use webhooks — set webhook_url on submit and skip the polling loop entirely; the API posts results when the job finishes regardless of duration. (2) For files larger than 50 MB, call client.presign_upload() to get a direct-to-storage URL, upload via httpx multipart, then submit with the returned audio_url instead of streaming through our gateway.

  • sync client와 async client 중 어느 것을 써야 하나요?

    기본은 sync(StemSplitter)를 사용하세요. 12줄 hello world가 사용하는 방식이고, Django view나 Celery task 안에 자연스럽게 맞습니다. 이미 FastAPI, Starlette, notebook의 asyncio 위에 있다면 AsyncStemSplitter로 전환하세요. method names는 동일합니다(await client.submit, await client.wait, await client.download). 바꾸는 비용은 import 하나와 call마다 await 하나입니다.

  • FastAPI와 Flask에서 동작하나요?

    네. 둘 다 first-class입니다. 위 Webhooks 섹션에는 각각 실행 가능한 handlers가 포함되어 있습니다. FastAPI는 verify_signature와 함께 async def webhook(request: Request)를 사용하고, Flask는 sync @app.post route를 사용합니다. 둘 다 한 번의 import(from aistemsplitter import verify_signature)로 HMAC-SHA256을 검증하고, 추가 parsing 없이 JSON body에서 presigned stem URLs를 풉니다.

  • virtualenv나 Poetry 프로젝트에는 어떻게 설치하나요?

    표준 도구를 사용하세요. venv는 `python -m venv .venv && source .venv/bin/activate && pip install aistemsplitter`, Poetry는 `poetry add aistemsplitter`, uv는 `uv add aistemsplitter`입니다. 패키지는 pure-Python wheels(no native compilation)이므로 모든 플랫폼에서 몇 초 안에 설치됩니다. pyenv shim, FFmpeg pre-step, GPU driver가 필요 없습니다.

  • hosted output이 로컬 htdemucs_ft 품질과 일치하나요?

    네. 오픈소스 커뮤니티가 신뢰하는 동일한 모델 파일인 htdemucs_ft와 htdemucs, htdemucs_6s를 노출합니다. 따라서 같은 model + 같은 input으로 로컬 Demucs를 실행한 결과와 bit-comparable합니다. 차이는 관리형 inference settings(batch size, precision) 정도입니다. guitar와 piano stems가 필요하면 submit에서 model='htdemucs_6s'를 전달하세요.

  • typed SDK를 넘어 raw HTTP가 필요하면 어떻게 하나요?

    /developers/api로 바로 내려가세요. SDK는 curl quickstart가 호출하는 동일한 REST endpoints 위의 얇은 typed wrapper입니다. 따라서 auth header(Authorization: Bearer ast_live_…), webhook signature scheme(HMAC-SHA256 in aistemsplitter-signature), response shapes가 동일합니다. 섞어서 사용할 수도 있습니다. 예를 들어 submit은 SDK로 호출하고, custom retry policy를 위해 status fetch는 raw httpx로 호출하세요.

  • 매우 긴 오디오가 timeout되지 않게 하려면 어떻게 하나요?

    두 가지 전략이 있습니다. (1) webhooks를 사용하세요. submit에 webhook_url을 설정하고 polling loop를 완전히 건너뛰면, API가 duration과 관계없이 job 완료 시 결과를 POST합니다. (2) 50 MB보다 큰 파일은 client.presign_upload()를 호출해 direct-to-storage URL을 받고, httpx multipart로 업로드한 뒤 gateway로 streaming하지 말고 반환된 audio_url로 submit하세요.

/ next steps

다음 단계

API reference

전체 REST endpoints, error codes, OpenAPI 3.1 spec.

n8n integration

workflow에 노드를 넣으세요 — 코드가 필요 없습니다.

GitHub repo

PyPI의 aistemsplitter source, issues, releases.

스프린트가 끝나기 전에 스템 분리를 출시하세요.

키 발급에 카드가 필요 없습니다. 무료 tier는 첫 3분을 포함하고, 이후에는 만료되지 않는 크레딧 팩으로 실행됩니다. 볼륨에 따라 분당 $0.08~$0.14입니다.

API 키 받기팀에 문의하기
LogoAI Stem Splitter

이 템플릿으로 다음 AI 제품을 더 빠르게 출시하세요.

GitHubDiscordEmail
제품
  • 기능
  • 요금제
  • FAQ
무료 도구
  • 키 파인더
  • Nightcore Maker
  • 피치 체인저
  • 슬로우 + 리버브 생성기
  • TikTok Voice 생성기
AI 도구
  • AI Vocal Removal
  • AI 아카펠라 추출기
  • 기타 제거기
  • 유튜브 & 사운드클라우드 보컬 리무버
  • Karaoke Maker
  • AI 드럼 리무버
  • Voice Isolator
대안
  • Lalal.ai 대안
  • Splitter.ai alternative
  • VocalRemover 대안
리소스
  • 블로그
  • API
개발자
  • API 레퍼런스
  • SDK
  • API 키 받기
통합
  • n8n 통합
신뢰
  • Stripe Climate
  • Product Hunt
법적 고지
  • 쿠키 정책
  • 개인정보 처리방침
  • 서비스 이용약관
BadgeBadge
BadgeBadge
BadgeBadge
BadgeBadge
© 2026 AI Stem Splitter All Rights Reserved.
LogoAI Stem Splitter
홈요금제
API 레퍼런스

REST 엔드포인트, 인증, 콜백, OpenAPI 3.1 사양.

SDK

7개의 공식 SDK(Node, Python, Java, Go, PHP, Swift, Lua).

API 키 받기

설정 → 개발자에서 키를 발급하세요.

키 파인더

회원가입 없이 템포와 음악 키 감지

Nightcore Maker

Nightcore, daycore, or sped-up versions from a YouTube link or upload.

피치 체인저

템포에 영향을 주지 않고 피치를 위아래로 조절하세요.

슬로우 + 리버브 생성기

TikTok, Reels, 슬로우 플레이리스트용 슬로우 + 리버브 편집.

TikTok Voice 생성기

숏폼 영상용 AI 보이스오버를 무료로 생성하세요.

AI Vocal Removal

Remove vocals for karaoke tracks, quick acapellas, and six-stem previews from files or supported links

AI 아카펠라 추출기

리믹스, 매시업, DJ 에디트를 위해 어떤 노래에서든 깨끗한 아카펠라를 뽑아내세요.

기타 제거기

기타를 뽑아내고 보컬, 드럼, 베이스가 살아 있는 진짜 밴드 위에서 연습하세요.

유튜브 & 사운드클라우드 보컬 리무버

유튜브 또는 사운드클라우드 링크를 붙여넣고 보컬, 드럼, 베이스, 피아노, 기타 등 스템으로 분리하세요

Karaoke Maker

Remove vocals from a song to make a clean instrumental backing track for sing-alongs, rehearsals, and karaoke nights

AI 드럼 리무버

곡을 업로드하고 드럼리스 트랙 하나를 다운로드하세요 — 보컬, 베이스, 그리고 드럼을 제외한 모든 악기.

Voice Isolator

잡음이 있는 녹음, 인터뷰, 통화, 현장 오디오에서 말소리를 추출합니다.

블로그
대시보드