Skip to main content
POST
/
api
/
v1
/
vocal-removal
/
generate
Separate Vocals from Music
curl --request POST \
  --url https://api.api.box/api/v1/vocal-removal/generate \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "taskId": "5c79****be8e",
  "audioId": "e231****-****-****-****-****8cadc7dc",
  "type": "separate_vocal",
  "callBackUrl": "https://api.example.com/callback"
}'
{
  "code": 200,
  "msg": "success",
  "data": {
    "taskId": "5c79****be8e"
  }
}

Usage Guide

  • This endpoint supports two vocal separation modes, allowing you to choose different separation types based on your needs
  • Suitable for karaoke applications, mixing, music production, or separating specific instruments for further processing
  • Works best with professionally recorded music that has clear vocal and instrumental parts

Separation Type Description

  • separate_vocal (default): Separate vocals and accompaniment, generating vocal and instrumental tracks
    • Output: Vocal track + Instrumental track (no vocals)
    • Suitable for karaoke production or basic vocal separation needs
  • split_stem: Separate various instrument sounds, generating vocals, backing vocals, drums, bass, guitar, keyboard, strings, brass, woodwinds, percussion, synthesizer, effects, and other tracks
    • Output: Multiple independent tracks including vocals, backing vocals, drums, bass, guitar, keyboard, strings, brass, woodwinds, percussion, synthesizer, effects, and other instruments
    • Suitable for professional music production, mixing, or scenarios requiring individual instrument processing

Parameter Details

  • taskId: Required, identifies the original music generation task
  • audioId: Required, specifies the audio track to process when multiple variants exist
  • type: Optional, specifies the separation type
    • Available values: separate_vocal, split_stem
    • Default value: separate_vocal

Developer Notes

  • All separated audio file URLs will be retained for 14 days
  • Separation quality depends on the complexity and mixing of the original track
  • All output files are in MP3 format with the same quality as the original
  • Different type parameters will return different numbers and types of audio tracks
  • Callback data structure varies based on the selected separation type

Authorizations

Authorization
string
header
required

🔑 API Authentication

All endpoints require authentication using Bearer Token.

Get API Key

  1. Visit the API Key Management Page to obtain your API Key

Usage

Add to request headers:

Authorization: Bearer YOUR_API_KEY

⚠️ Note:

  • Keep your API Key secure and do not share it with others
  • If you suspect your API Key has been compromised, reset it immediately from the management page

Body

application/json
taskId
string
required

The task ID of the music generation task.

  • Required. This identifies the task containing the audio to be processed.
  • Both taskId and audioId are needed for accurate track identification.
Example:

"5c79****be8e"

audioId
string
required

The ID of the specific audio track to separate.

  • Required. This identifies which specific track within the task to process.
  • Both taskId and audioId are needed for accurate track identification.
Example:

"e231****-****-****-****-****8cadc7dc"

callBackUrl
string<uri>
required

The URL to receive vocal separation results when processing is complete.

  • Required.
  • The callback will include different types of separation results based on the type parameter:
    • separate_vocal: Contains vocal and instrumental separation results
    • split_stem: Contains various instrument separation results

For detailed callback format and implementation guide, see Vocal Separation Callbacks

  • Alternatively, you can use the Get Vocal Separation Details interface to poll task status
Example:

"https://api.example.com/callback"

type
enum<string>
default:separate_vocal

Vocal separation type.

  • Optional, default value is separate_vocal.
  • separate_vocal: Separate vocals and accompaniment, generating vocal and instrumental tracks
  • split_stem: Separate various instrument sounds, generating vocals, backing vocals, drums, bass, guitar, keyboard, strings, brass, woodwinds, percussion, synthesizer, effects, and other tracks
Available options:
separate_vocal,
split_stem
Example:

"separate_vocal"

Response

Request successful

code
enum<integer>

Status Codes

  • ✅ 200 - Request successful
  • ⚠️ 400 - Invalid parameters
  • ⚠️ 401 - Unauthorized access
  • ⚠️ 404 - Invalid request method or path
  • ⚠️ 405 - Rate limit exceeded
  • ⚠️ 413 - Theme or prompt too long
  • ⚠️ 429 - Insufficient credits
  • ⚠️ 430 - Your call frequency is too high. Please try again later.
  • ⚠️ 455 - System maintenance
  • ❌ 500 - Server error
Available options:
200,
400,
401,
404,
405,
413,
429,
430,
455,
500
Example:

200

msg
string

Error message when code != 200

Example:

"success"

data
object
I