Sand AISand AI MAGI-2MAGI-2 is now on SandBase: 1080p video with native audioTry it now

Demucs

meta/demucs

Demucs by Meta separates a song into vocals, drums, bass, and other stems, plus guitar and piano with the 6-stem htdemucs_6s model, and returns each stem as its own audio file.

Base price
$0.04USD / run
Execution
async
Model type
audio
Input fields
3
Production route

Try the model

Playground

Open playground
Input
Song file or URL to separate into stems.
Demucs model used for separation. Only htdemucs_6s returns guitar and piano stems.
Audio format of the separated stems.
OutputReady

Your output will appear here

Complete the inputs, then click Run.

Model card

Specifications

Pricing

Base price
$0.04 / run

Context & modalities

Input
Schema-defined
Output
audio

Capabilities

Chat
Not supported
Vision
Not supported
Reasoning
Not supported
Structured output
Not supported
Function calling
Not supported
Audio input
Not supported

Access

Provider
Meta
Model ID
meta/demucs
Execution
async
Base URL
https://api.sandbase.ai
API
Unified Run API
Endpoint
/v1/run

API README

Demucs

Demucs by Meta splits a song into separate stems: vocals, drums, bass, and other, plus guitar and piano with htdemucs_6s.

Fields

FieldTypeDefaultNotes
audioaudio file or URL, required—Song to separate.
separation_modelhtdemucs / htdemucs_ft / htdemucs_6s / hdemucs_mmi / mdx / mdx_extra / mdx_q / mdx_extra_qhtdemucs_6sDemucs variant; htdemucs_6s adds guitar and piano.
output_formatwav / mp3mp3Format of each stem.

Output

FieldNotes
urlVocals stem.
drums_urlDrums stem.
bass_urlBass stem.
other_urlEverything else.
guitar_urlGuitar stem (htdemucs_6s only).
piano_urlPiano stem (htdemucs_6s only).

Billing

$0.0007 per started second of input audio. The quote uses the measured audio length.

AudioPrice
1 min$0.042
3 min$0.126
10 min$0.42

Failed runs are not charged.

Also on SandBase

Related: meta/sam-audio/separate.

Start building

Send your first request

OpenAI-compatible endpoint with unified authentication and usage tracking.

Production API
Unified Run API endpoint
https://api.sandbase.ai/v1/run
Model ID
meta/demucs
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
  -X POST "https://api.sandbase.ai/v1/run" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  --data-binary @- <<'SANDBASE_JSON'
{
  "model": "meta/demucs",
  "audio": "https://static.sandbase.ai/examples/meta/demucs/input_audio_0.mp3",
  "output_format": "mp3",
  "separation_model": "htdemucs_6s"
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
  status=$(printf '%s' "$result" | jq -r .status)
  case "$status" in completed|failed|timeout) break ;; esac
  sleep 2
  result=$(curl --fail-with-body --silent \
    -H "Authorization: Bearer $SANDBASE_API_KEY" \
    "https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"
01

Input Schema

3 parameters · 1 required · 2 optional

ParameterTypeRequiredDescription
audiostringRequiredSong file or URL to separate into stems.
output_formatstringOptionalAudio format of the separated stems. · Options: wav, mp3 · Default: "mp3"
wavmp3
separation_modelstringOptionalDemucs model used for separation. Only htdemucs_6s returns guitar and piano stems. · Options: htdemucs, htdemucs_ft, htdemucs_6s, hdemucs_mmi, mdx, mdx_extra, mdx_q, mdx_extra_q · Default: "htdemucs_6s"
htdemucshtdemucs_fthtdemucs_6shdemucs_mmimdxmdx_extramdx_qmdx_extra_q
02

Output Schema

FieldTypeDescription
idstringUnique identifier for the generation task
statusstringTask status: pending, running, completed, failed, timeout
modelstringModel used for the generation
outputsarrayArray of output items
outputs[].urlstringURL of the generated artifact
outputs[].content_typestringMIME type (e.g. image/png, video/mp4)
errorobject | nullError details if failed, null on success
error.typestringMachine-readable error type code
error.messagestringHuman-readable error description

Async Workflow

This model runs asynchronously. Submit a request, then poll for the result.

  1. Submit: POST to /v1/run and read the returned id.
  2. Poll: GET /v1/run/{id} until status is completed, failed or timeout.
  3. Retrieve: read outputs from the completed response.

Choose your model

Compare models

All image & video models
ModelTypeDefault priceReleased
DemucsThis model
Meta
Audio$0.04 / runOct 27, 2025
MetaAudio$0.05 / runDec 30, 2025
MetaAudio$0.05 / runDec 30, 2025
MetaAudio$0.05 / runDec 30, 2025

Questions

FAQ

How do I call Meta Demucs through SandBase?

Create a SandBase API key, then send requests with the model ID "meta/demucs" to Unified Run API (/v1/run) at https://api.sandbase.ai. The request examples on this page show the exact payload.

Do I need a separate Meta account?

No. One SandBase API key and balance gives you access to Meta Demucs and the other models in the catalog; you do not need to sign up with Meta separately.