{"info":{"title":"meta/demucs","version":"1.0.0"},"paths":{"/":{"post":{"summary":"Separate","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Output"}}},"description":"Successful Response"}},"operationId":"meta_demucs_separate","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Input"}}},"required":true}}}},"openapi":"3.1.0","components":{"schemas":{"Input":{"type":"object","title":"Input","required":["audio"],"properties":{"audio":{"type":"string","title":"Audio","format":"uri","x-order":0,"description":"URL of the audio file to separate. This is built for a full-band music mix with the lead vocal present - a solo vocal, or a track that is already instrumental, has nothing to split. Decoding is ffmpeg-backed, so wav, mp3, flac and ogg/vorbis all work. There is no length limit: both runtime and price grow with the duration of the track, because this endpoint bills by second of compute."},"model":{"allOf":[{"$ref":"#/components/schemas/ModelEnum"}],"title":"Model","default":"htdemucs","x-order":1,"description":"Which separation network runs. htdemucs (the default) is the first Hybrid Transformer Demucs, trained on MusDB plus 800 songs. htdemucs_ft is its fine-tuned version: separation will take 4 times more time but might be a bit better, and because this endpoint bills compute time it costs roughly four times as much too. htdemucs_6s adds guitar and piano as internal sources, but the result here is still the same vocal/instrumental pair. hdemucs_mmi is the earlier Hybrid Demucs v3, retrained on the same data. mdx_q and mdx_extra_q are quantized versions of the older models - a smaller download, and quality can be slightly worse. Every value supports the vocal split, so the choice only trades quality against time and cost."},"shifts":{"type":"integer","title":"Shifts","default":1,"maximum":2,"minimum":1,"x-order":4,"description":"How many random-shift passes to average. Each extra shift re-runs the whole separation on a shifted copy of the input and averages the results, which can steady a split that sounds unstable - and multiplies both the runtime and, because this endpoint bills compute time, the price. 1 (a single pass) is the default and is right for almost every track; 2 is the highest value accepted here."},"clip_mode":{"allOf":[{"$ref":"#/components/schemas/ClipModeEnum"}],"title":"Clip Mode","default":"rescale","x-order":5,"description":"What to do when a separated track goes past full scale. rescale (the default) scales the whole signal down so nothing clips; clamp allows hard clipping; none leaves the samples untouched."},"mp3_bitrate":{"type":"integer","title":"MP3 Bitrate","default":320,"maximum":320,"minimum":64,"x-order":3,"description":"Bitrate in kbps for MP3 output. Higher means better quality and a larger file. Has no effect unless output_format is mp3."},"output_format":{"allOf":[{"$ref":"#/components/schemas/OutputFormatEnum"}],"title":"Output Format","default":"mp3","x-order":2,"description":"Container the two returned files are encoded in. mp3 (the default) is the smallest; flac is lossless and compressed; wav is lossless and uncompressed. Both files always come back in the same format."}}},"Output":{"type":"array","items":{"type":"string","format":"uri"},"title":"Output","maxItems":2,"minItems":2,"description":"The two separated tracks, as URLs, always in this order: index 0 is the INSTRUMENTAL - the full mix with the vocal removed - and index 1 is the ISOLATED VOCAL. Both files are the full length of the input, sampled at 44.1 kHz, and encoded in the container chosen by output_format."},"ModelEnum":{"enum":["htdemucs","htdemucs_ft","htdemucs_6s","hdemucs_mmi","mdx_q","mdx_extra_q"],"type":"string","title":"ModelEnum","description":"Demucs separation network. htdemucs is the default Hybrid Transformer model; htdemucs_ft is its fine-tuned variant; htdemucs_6s adds guitar and piano as internal sources; hdemucs_mmi is Hybrid Demucs v3; mdx_q and mdx_extra_q are quantized versions of the older models."},"ClipModeEnum":{"enum":["rescale","clamp","none"],"type":"string","title":"ClipModeEnum"},"OutputFormatEnum":{"enum":["mp3","flac","wav"],"type":"string","title":"OutputFormatEnum"}}}}