Skip to content

Demucs

POST/v1/run

Demucs by Meta - advanced AI model for audio-to-audio. Delivers high-quality results with fast inference, suitable for both creative and production workflows.

Request body

Submit an async generation request. The model field selects the model; other fields are model-specific input parameters.

stringmodelrequired

Model identifier. Set to meta/demucs.

Default: meta/demucs

Optional<string>audio

URL of the audio file to separate into stems

Optional<string>output_format

Output audio format for the separated stems

Allowed values: wav, mp3

Default: mp3

Optional<array<string>>stems

Specific stems to extract. If None, extracts all available stems. Available stems depend on model: vocals, drums, bass, other, guitar, piano (for 6s model)

Default: vocals,drums,bass,other,guitar,piano

Optional<integer>segment_length

Length in seconds of each segment for processing. Smaller values use less memory but may reduce quality. Default is model-specific.

Optional<number>overlap

Overlap between segments (0.0 to 1.0). Higher values may improve quality but increase processing time.

Range: 0 to 1

Default: 0.25

Optional<integer>shifts

Number of random shifts for equivariant stabilization. Higher values improve quality but increase processing time.

Range: 1 to 10

Default: 1

Response Schema

The submit endpoint returns a run response. If its status is pending or running, poll GET /v1/run/{id} with the returned opaque ID until it reaches a terminal state.

stringidrequired

Opaque SandBase run identifier. Use it exactly as returned; no prefix is guaranteed.

stringstatusrequired

Current public run status.

Allowed values: pending, running, completed, failed, timeout

Optional<string>model

Public SandBase model name used for this run.

Optional<array<object>>outputs

Present only for completed runs. Each object is capability-specific; inspect the selected model schema for its fields.

Optional<object>error

Present only for failed or timeout runs. Contains a public error type and sanitized message.

Optional<string>error.type

Stable public error category.

Optional<string>error.message

Sanitized error message safe to show to clients.

Optional<object>usage

Usage details when available.

Model capabilities

array<string>capability_tagsrequired

Capabilities declared by the model registry.

Default: audio-to-audio

stringexecution_moderequired

Execution mode declared by the model registry.

Default: async