When vocal and instrument separation generation is complete, the system will call this callback to notify the results.
When you submit a task to the vocal and instrument separation API, you can use the 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#
Content Type: application/json
When the task is completed, the system will send a POST request to your callBackUrl in the following format. The callback data structure varies based on the requested type parameter:separate_vocal Type Callback
split_stem_advanced Type Callback
Vocal Separation Failed Callback
{
"code": 200,
"msg": "vocal Removal generated successfully.",
"data": {
"task_id": "3e63b4cc88d52611159371f6af5571e7",
"vocal_removal_info": {
"instrumental_url": "https://file.aiquickdraw.com/s/d92a13bf-c6f4-4ade-bb47-f69738435528_Instrumental.mp3",
"origin_url": "",
"vocal_url": "https://file.aiquickdraw.com/s/3d7021c9-fa8b-4eda-91d1-3b9297ddb172_Vocals.mp3"
}
}
}
Status Code Description#
code · integer · requiredCallback status code indicating task processing result:| Status Code | Description |
|---|
| 200 | Success - Vocal separation completed |
| 400 | Bad Request - Invalid source audio or parameter error |
| 401 | Unauthorized - Invalid API key |
| 429 | Insufficient Credits - Account credit balance insufficient |
| 500 | Server Error - Please retry later |
Status message providing detailed status descriptiondata.task_id · string · requiredTask ID, consistent with the taskId returned when you submitted the taskdata.vocal_removal_info · objectVocal separation result information, returned on success. Fields vary based on separation typeseparate_vocal Type Fields#
data.vocal_removal_info.origin_url · stringdata.vocal_removal_info.vocal_url · stringSeparated vocal audio file URLdata.vocal_removal_info.instrumental_url · stringSeparated instrumental audio file URL (no vocals)split_stem Type Fields#
data.vocal_removal_info.origin_url · stringdata.vocal_removal_info.vocal_url · stringSeparated vocal audio file URLdata.vocal_removal_info.backing_vocals_url · stringSeparated backing vocals audio file URLdata.vocal_removal_info.drums_url · stringSeparated drums audio file URLdata.vocal_removal_info.bass_url · stringSeparated bass audio file URLdata.vocal_removal_info.guitar_url · stringSeparated guitar audio file URLdata.vocal_removal_info.keyboard_url · stringSeparated keyboard audio file URLdata.vocal_removal_info.percussion_url · stringSeparated percussion instruments audio file URLdata.vocal_removal_info.strings_url · stringSeparated string instruments audio file URLdata.vocal_removal_info.synth_url · stringSeparated synthesizer audio file URLdata.vocal_removal_info.fx_url · stringSeparated sound effects audio file URLdata.vocal_removal_info.brass_url · stringSeparated brass instruments audio file URLdata.vocal_removal_info.woodwinds_url · stringSeparated woodwind instruments audio file URLsplit_stem_advanced Type Fields#
data.vocal_removal_info.origin_data · arrayAn 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).data.vocal_removal_info.origin_data[].extract · objectInformation about the extracted target stem (isolates this stem while removing others).data.vocal_removal_info.origin_data[].extract.duration · numberThe duration of the extracted audio, in seconds.data.vocal_removal_info.origin_data[].extract.audio_url · stringThe download URL of the extracted target stem audio file.data.vocal_removal_info.origin_data[].extract.stem_type_group_name · stringThe stem type group name (e.g., Lead Vocal), indicating which type of stem this group extracts.data.vocal_removal_info.origin_data[].extract.id · stringThe unique identifier for the extracted audio.data.vocal_removal_info.origin_data[].remove · objectInformation about the remaining audio after removing the target stem (removes this stem while keeping others).data.vocal_removal_info.origin_data[].remove.duration · numberThe duration of the audio after removal, in seconds.data.vocal_removal_info.origin_data[].remove.audio_url · stringThe download URL of the remaining audio file after the target stem has been removed.data.vocal_removal_info.origin_data[].remove.stem_type_group_name · stringThe stem type group name (e.g., Lead Vocal), consistent with the corresponding extract entry.data.vocal_removal_info.origin_data[].remove.id · stringThe 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:Best Practices#
Vocal Separation Callback Configuration#
1.
Multi-track Management: Organize separated tracks with clear naming conventions
2.
Quality Assessment: Verify separation quality for each track type
3.
Storage Organization: Create folder structures for different separation projects
4.
Batch Processing: Implement efficient batch downloads for multiple tracks
5.
Track Analysis: Analyze separated tracks for remix and production purposes
6.
Backup Strategy: Maintain backups of both original and separated tracks
Separation-Specific Considerations#
Separation quality depends on the complexity of the original mix
Some instruments may not separate cleanly in all cases
Vocal separation works best with clear, well-mixed source material
Multiple separated files require significant storage space
Processing time varies based on track length and complexity
Troubleshooting#
Common issues specific to vocal separation callbacks: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.