POST /v1/stem-separation
Stem separation
Split one mix into separate tracks and return a download link for each track.
POST https://api.pascalai.co/v1/stem-separationContent-Type: multipart/form-data
Authenticate with Authorization: Bearer and an API key. Send model before file. The file must be under 500 MB. The call remains open for up to 4 minutes. When processing has finished inside that window, the body is the job. When status is queued or running, retrieve the same object with GET /v1/stem-separation/{job_id}.
| Field | Type | Description |
|---|---|---|
modelRequired | string | Catalogue id of the separation model. This part must be sent before the file. |
fileRequired | file | Audio file to separate. The file must be under 500 MB. |
params | string | JSON object for that model, encoded as a string. Omit the field, or send an empty string, to use the defaults. The value must be a JSON object. The fields are on the model page. |
name | string | Optional label stored on the job and returned as name. |
Response
200 with the job. A successful file is charged $0.05 plus the audio duration in minutes. result.artifacts lists one object per track. Each object has name and url. Download each file within one day. The file is deleted after that. The job record remains.
Batch
POST /v1/stem-separation/batch
Separate up to 50 files in a single request. All files use the same model and the same parameters. Send model, then params, then each audio file as a part named file. Each file must be under 500 MB.
The response contains the batch identifier. Retrieve progress with GET /v1/stem-separation/batch/{batch_id}. An account may have two open batches. A successful batch is charged $0.05 once. Each file is charged for its audio duration in minutes.
Example
curl https://api.pascalai.co/v1/stem-separation \
-H "Authorization: Bearer $PASCAL_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-F model=htdemucs \
-F params='{"stems":["vocals","drums","bass","other"],"overlap":0.1,"output_format":"flac"}' \
-F file=@song.mp3
curl https://api.pascalai.co/v1/stem-separation/$JOB_ID \
-H "Authorization: Bearer $PASCAL_API_KEY"Models
htdemucs44.1 kHz stereo float WAVhtdemucs-ft44.1 kHz stereo float WAVhtdemucs-6s44.1 kHz stereo float WAVmdx-extra-q44.1 kHz stereo float WAVmelband-roformer44.1 kHz stereo float WAVbs-roformer-6stem44.1 kHz stereo float WAV