musictomidi_separate_stems
Starts a stem separation job from a local audio or video file and returns a job ID and status immediately for later progress checks and result downloads.
Instructions
Uploads a local audio or video file to MusicToMIDI and starts a stem separation job, whose result is one audio file per stem. Returns at once, without waiting for the end of the job: jobId (give it to musictomidi_get_job to get the status, then to musictomidi_download_result to get the files) and status.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"file_path": "<file_path>",
"model": "<model>"
},
"name": "musictomidi_separate_stems"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mp3 | No | true: the same as adding mp3 to formats. Default: false. | |
| model | Yes | Always separation. Price: the separation entry of musictomidi_get_prices. | |
| stems | No | Stems to return. Not sent: vocals, drums, bass, guitar, piano and other. instrumental: the song without the voice. backing: the song without the other stems of the list (leave at least one of vocals, drums, bass, guitar, piano, other out of the list). | |
| formats | No | Audio formats of each stem: flac (returned in url) and/or mp3 at 320 kbit/s (returned in mp3Url). ["mp3"] alone returns no FLAC. Default: ["flac"]. | |
| file_path | Yes | Absolute path of the local file to send: audio (mp3, wav, ogg, opus, flac, m4a, aac, aiff…) or video (mp4, mov, webm, mkv, avi…, its audio track is used). Limits: 4 GB (a larger file is refused before it is sent), and 2 hours of audio (a longer audio makes the job fail with audio_too_long). | |
| endSeconds | No | End of the audio selection, in seconds, after startSeconds. | |
| startSeconds | No | Start of the audio selection, in seconds from the start of the file. Sent with endSeconds: only the selection is separated and paid; the stems still cover the whole file, with silence outside the selection. | |
| Idempotency-Key | No | Optional. A code of your choice (8 to 255 characters) that protects against starting the same job twice. Call again with the same code, the same file and the same parameters, for example after a network error: the job already started is returned, the file is not sent again and nothing is billed twice. Use a new code for each new job. After a restart of this server, or 24 hours after the first call, the same code is refused (idempotency_conflict) instead of returning the job: no second job is started. |