callBackUrl parameter to set a callback URL. When the task is completed, the system will automatically push the results to your specified address.
Callback Mechanism Overview
The callback mechanism eliminates the need to poll the API for task status. The system will proactively push task completion results to your server. The callback data structure varies based on the
type parameter specified in the request.Callback Timing
The system will send callback notifications in the following situations:- Vocal separation completed
- Vocal separation task failed
- Error occurred during task processing
Vocal separation has only one callback stage, but different numbers of separated audio file URLs are provided based on the separation type (
separate_vocal or split_stem)Callback Method
- HTTP Method: POST
- Content Type: application/json
- Timeout: 15 seconds
Callback Request Format
When the task is completed, the system will send a POST request to yourcallBackUrl in the following format. The callback data structure varies based on the requested type parameter:
Status Code Description
integer
required
Callback status code indicating task processing result:
string
required
Status message providing detailed status description
string
required
Task ID, consistent with the taskId returned when you submitted the task
object
Vocal separation result information, returned on success. Fields vary based on separation type
separate_vocal Type Fields
string
Original audio file URL
string
Separated vocal audio file URL
string
Separated instrumental audio file URL (no vocals)
split_stem Type Fields
string
Original audio file URL
string
Separated vocal audio file URL
string
Separated backing vocals audio file URL
string
Separated drums audio file URL
string
Separated bass audio file URL
string
Separated guitar audio file URL
string
Separated keyboard audio file URL
string
Separated percussion instruments audio file URL
string
Separated string instruments audio file URL
string
Separated synthesizer audio file URL
string
Separated sound effects audio file URL
string
Separated brass instruments audio file URL
string
Separated woodwind instruments audio file URL
split_stem_advanced Type Fields
array
An array of separation results for the original audio, containing extraction and removal information for multiple stem groups. Each element represents an independent stem group (e.g., Lead Vocal).
object
Information about the extracted target stem (isolates this stem while removing others).
number
The duration of the extracted audio, in seconds.
string
The download URL of the extracted target stem audio file.
string
The stem type group name (e.g., Lead Vocal), indicating which type of stem this group extracts.
string
The unique identifier for the extracted audio.
object
Information about the remaining audio after removing the target stem (removes this stem while keeping others).
number
The duration of the audio after removal, in seconds.
string
The download URL of the remaining audio file after the target stem has been removed.
string
The stem type group name (e.g., Lead Vocal), consistent with the corresponding extract entry.
string
The unique identifier for the remaining audio.
Callback Reception Examples
Here are example codes for receiving callbacks in various popular programming languages, supporting both separation types:- Node.js
- Python
- PHP
Best Practices
Troubleshooting
Common issues specific to vocal separation callbacks:Separation Quality
Separation Quality
- Verify the source audio quality and mixing
- Check if the original track has clear instrument separation
- Consider the complexity of the musical arrangement
- Test with different source materials to understand limitations
Multi-file Downloads
Multi-file Downloads
- Ensure stable network connection for multiple large file downloads
- Implement error handling for partial download failures
- Verify all track URLs are accessible and not expired
- Monitor download progress for all separated tracks
Storage and Organization
Storage and Organization
- Plan adequate storage for multiple separated track files
- Implement consistent naming conventions for track identification
- Consider automated organization based on task IDs
- Monitor disk space usage for large separation projects
Alternative Solutions
If you cannot use the callback mechanism, you can also use polling:Poll Separation Results
Use the Get Vocal Separation Details interface to regularly query separation task status. Recommend querying every 30 seconds.
