RecoupGet a Free AuditFree Audit

API REFERENCE

Separate audio stems

On this page
POST/api/music/stem-separation

Separate an audio file into individual stems (vocals, drums, bass, etc.). Upload an audio file via multipart/form-data. Choose between two-stem separation (vocals + instrumental) or six-stem separation (vocals, drums, bass, guitar, piano, other). Returns a ZIP archive containing the separated stems.

Authentication

x-api-key in header

bearerAuth bearer

Request

cURL
curl --request POST \
  --url 'https://api.recoupable.dev/api/music/stem-separation' \
  --header 'x-api-key: YOUR_API_KEY' \
  --form 'file=@YOUR_FILE_PATH'

Request body required

Audio file and separation parameters

multipart/form-data

filestringrequired

Audio file to separate into stems

format: binary

stem_variation_idstring · enum

Stem separation mode. two_stems_v1 produces vocals + instrumental. six_stems_v1 produces vocals, drums, bass, guitar, piano, and other.

Values: "two_stems_v1", "six_stems_v1"

Default: "six_stems_v1"

sign_with_c2paboolean

Sign the output with C2PA content credentials

Default: false

output_formatstring

Audio output format (e.g. mp3_44100_192)

Responses

200Stems separated successfully. Returns a ZIP archive containing the individual stems.

application/zip

string

400Validation failed — invalid or missing request body fields

application/json

errorstringrequired

Error message describing what went wrong.

401Unauthorized — invalid or missing API key

application/json

errorstringrequired

Error message describing what went wrong.

500Internal server error

application/json

errorstringrequired

Error message describing what went wrong.

Full specification

Download the OpenAPI file for complete schemas, constraints, and examples.

Download content.json
View operation source
json
{
  "description": "Separate an audio file into individual stems (vocals, drums, bass, etc.). Upload an audio file via multipart/form-data. Choose between two-stem separation (vocals + instrumental) or six-stem separation (vocals, drums, bass, guitar, piano, other). Returns a ZIP archive containing the separated stems.",
  "security": [
    {
      "apiKeyAuth": []
    },
    {
      "bearerAuth": []
    }
  ],
  "requestBody": {
    "description": "Audio file and separation parameters",
    "required": true,
    "content": {
      "multipart/form-data": {
        "schema": {
          "type": "object",
          "properties": {
            "file": {
              "type": "string",
              "format": "binary",
              "description": "Audio file to separate into stems"
            },
            "stem_variation_id": {
              "type": "string",
              "enum": [
                "two_stems_v1",
                "six_stems_v1"
              ],
              "default": "six_stems_v1",
              "description": "Stem separation mode. `two_stems_v1` produces vocals + instrumental. `six_stems_v1` produces vocals, drums, bass, guitar, piano, and other."
            },
            "sign_with_c2pa": {
              "type": "boolean",
              "default": false,
              "description": "Sign the output with C2PA content credentials"
            },
            "output_format": {
              "type": "string",
              "description": "Audio output format (e.g. mp3_44100_192)"
            }
          },
          "required": [
            "file"
          ]
        }
      }
    }
  },
  "responses": {
    "200": {
      "description": "Stems separated successfully. Returns a ZIP archive containing the individual stems.",
      "content": {
        "application/zip": {
          "schema": {
            "type": "string",
            "format": "binary"
          }
        }
      }
    },
    "400": {
      "description": "Validation failed — invalid or missing request body fields",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/MusicErrorResponse"
          }
        }
      }
    },
    "401": {
      "description": "Unauthorized — invalid or missing API key",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/MusicErrorResponse"
          }
        }
      }
    },
    "500": {
      "description": "Internal server error",
      "content": {
        "application/json": {
          "schema": {
            "$ref": "#/components/schemas/MusicErrorResponse"
          }
        }
      }
    }
  }
}