When you submit a vocal separation task to the Suno API, you can use the callBackUrl parameter to set a callback URL. The system will automatically push the results to your specified address when the task is completed.
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.
Callback Timing
The system will send callback notifications in the following situations:
Vocal separation task completed successfully
Vocal separation task failed
Errors occurred during task processing
Callback Method
HTTP Method : POST
Content Type : application/json
Timeout Setting : 15 seconds
When the task is completed, the system will send a POST request to your callBackUrl based on the separation type you selected. Different separation types correspond to different callback data structures:
separate_vocal Type Callbacks
Success Callback - separate_vocal
Failure Callback - separate_vocal
{
"code" : 200 ,
"msg" : "vocal separation generated successfully." ,
"data" : {
"task_id" : "3e63b4cc88d52611159371f6af5571e7" ,
"vocal_separation_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"
}
}
}
split_stem Type Callbacks
Success Callback - split_stem
Failure Callback - split_stem
{
"code" : 200 ,
"msg" : "vocal separation generated successfully." ,
"data" : {
"task_id" : "e649edb7abfd759285bd41a47a634b10" ,
"vocal_separation_info" : {
"origin_url" : "" ,
"backing_vocals_url" : "https://file.aiquickdraw.com/s/aadc51a3-4c88-4c8e-a4c8-e867c539673d_Backing_Vocals.mp3" ,
"bass_url" : "https://file.aiquickdraw.com/s/a3c2da5a-b364-4422-adb5-2692b9c26d33_Bass.mp3" ,
"brass_url" : "https://file.aiquickdraw.com/s/334b2d23-0c65-4a04-92c7-22f828afdd44_Brass.mp3" ,
"drums_url" : "https://file.aiquickdraw.com/s/ac75c5ea-ac77-4ad2-b7d9-66e140b78e44_Drums.mp3" ,
"fx_url" : "https://file.aiquickdraw.com/s/a8822c73-6629-4089-8f2a-d19f41f0007d_FX.mp3" ,
"guitar_url" : "https://file.aiquickdraw.com/s/064dd08e-d5d2-4201-9058-c5c40fb695b4_Guitar.mp3" ,
"keyboard_url" : "https://file.aiquickdraw.com/s/adc934e0-df7d-45da-8220-1dba160d74e0_Keyboard.mp3" ,
"percussion_url" : "https://file.aiquickdraw.com/s/0f70884d-047c-41f1-a6d0-7044618b7dc6_Percussion.mp3" ,
"strings_url" : "https://file.aiquickdraw.com/s/49829425-a5b0-424e-857a-75d4c63a426b_Strings.mp3" ,
"synth_url" : "https://file.aiquickdraw.com/s/56b2d94a-eb92-4d21-bc43-3460de0c8348_Synth.mp3" ,
"vocal_url" : "https://file.aiquickdraw.com/s/07420749-29a2-4054-9b62-e6a6f8b90ccb_Vocals.mp3" ,
"woodwinds_url" : "https://file.aiquickdraw.com/s/d81545b1-6f94-4388-9785-1aaa6ecabb02_Woodwinds.mp3"
}
}
}
Status Code Description
Callback status code indicating task processing result: Status Code Description 200 Success - Request has been processed successfully 500 Internal Error - Please try again later
Status message providing detailed status description
Task ID, consistent with the task_id returned when you submitted the task
data.vocal_separation_info
Vocal separation result information, returned on success. The returned fields depend on the separation type (type parameter)
separate_vocal Type Callback Fields
data.vocal_separation_info.instrumental_url
Instrumental part audio URL (separate_vocal type only)
data.vocal_separation_info.origin_url
Original audio URL
data.vocal_separation_info.vocal_url
Vocal part audio URL
split_stem Type Callback Fields
data.vocal_separation_info.origin_url
Original audio URL
data.vocal_separation_info.vocal_url
Main vocal audio URL
data.vocal_separation_info.backing_vocals_url
Backing vocals audio URL (split_stem type only)
data.vocal_separation_info.drums_url
Drums part audio URL (split_stem type only)
data.vocal_separation_info.bass_url
Bass part audio URL (split_stem type only)
data.vocal_separation_info.guitar_url
Guitar part audio URL (split_stem type only)
data.vocal_separation_info.keyboard_url
Keyboard part audio URL (split_stem type only)
data.vocal_separation_info.percussion_url
Percussion part audio URL (split_stem type only)
data.vocal_separation_info.strings_url
Strings part audio URL (split_stem type only)
data.vocal_separation_info.synth_url
Synthesizer part audio URL (split_stem type only)
data.vocal_separation_info.fx_url
Effects part audio URL (split_stem type only)
data.vocal_separation_info.brass_url
Brass part audio URL (split_stem type only)
data.vocal_separation_info.woodwinds_url
Woodwinds part audio URL (split_stem type only)
Callback Reception Examples
Below are example codes for receiving callbacks in popular programming languages:
const express = require ( 'express' );
const app = express ();
app . use ( express . json ());
app . post ( '/suno-vocal-separation-callback' , ( req , res ) => {
const { code , msg , data } = req . body ;
console . log ( 'Received vocal separation callback:' , {
taskId: data . task_id ,
status: code ,
message: msg
});
if ( code === 200 ) {
// Task completed successfully
console . log ( 'Vocal separation completed' );
const vocalInfo = data . vocal_separation_info ;
if ( vocalInfo ) {
console . log ( 'Separation results:' );
console . log ( `Original audio: ${ vocalInfo . origin_url } ` );
console . log ( `Vocal part: ${ vocalInfo . vocal_url } ` );
// separate_vocal type specific fields
if ( vocalInfo . instrumental_url ) {
console . log ( `Instrumental part: ${ vocalInfo . instrumental_url } ` );
}
// split_stem type specific fields
if ( vocalInfo . backing_vocals_url ) {
console . log ( `Backing vocals: ${ vocalInfo . backing_vocals_url } ` );
console . log ( `Drums part: ${ vocalInfo . drums_url } ` );
console . log ( `Bass part: ${ vocalInfo . bass_url } ` );
console . log ( `Guitar part: ${ vocalInfo . guitar_url } ` );
console . log ( `Keyboard part: ${ vocalInfo . keyboard_url } ` );
console . log ( `Percussion part: ${ vocalInfo . percussion_url } ` );
console . log ( `Strings part: ${ vocalInfo . strings_url } ` );
console . log ( `Synthesizer part: ${ vocalInfo . synth_url } ` );
console . log ( `Effects part: ${ vocalInfo . fx_url } ` );
console . log ( `Brass part: ${ vocalInfo . brass_url } ` );
console . log ( `Woodwinds part: ${ vocalInfo . woodwinds_url } ` );
}
// Process separated audio files
// Can download files, save locally, etc.
}
} else {
// Task failed
console . log ( 'Vocal separation failed:' , msg );
// Handle failure scenarios...
}
// Return 200 status code to confirm callback received
res . status ( 200 ). json ({ status: 'received' });
});
app . listen ( 3000 , () => {
console . log ( 'Callback server running on port 3000' );
});
Best Practices
Callback URL Configuration Recommendations
Use HTTPS : Ensure callback URL uses HTTPS protocol for secure data transmission
Verify Origin : Verify the legitimacy of the request source in callback processing
Idempotent Processing : The same task_id may receive multiple callbacks, ensure processing logic is idempotent
Quick Response : Callback processing should return 200 status code quickly to avoid timeout
Asynchronous Processing : Complex business logic should be processed asynchronously to avoid blocking callback responses
Type-based Processing : Handle different audio file structures based on different separation types
Batch Download : split_stem type produces multiple files, recommend batch downloading and organizing by type
Important Reminders
Callback URL must be publicly accessible
Server must respond within 15 seconds, otherwise will be considered timeout
If 3 consecutive retry attempts fail, the system will stop sending callbacks
Please ensure the stability of callback processing logic to avoid callback failures due to exceptions
Vocal separation generated audio file URLs may have time limits, recommend downloading and saving promptly
Note that some audio part URLs may be empty, certain instrument separations might be empty
separate_vocal and split_stem types return different fields, please handle corresponding fields based on the type parameter in the request
Troubleshooting
If you are not receiving callback notifications, please check the following:
Network Connection Issues
Confirm callback URL is accessible from public internet
Check firewall settings to ensure inbound requests are not blocked
Verify domain name resolution is correct
Ensure server returns HTTP 200 status code within 15 seconds
Check server logs for error messages
Verify endpoint path and HTTP method are correct
Confirm received POST request body is in JSON format
Check if Content-Type is application/json
Verify JSON parsing is correct
Confirm all audio file URLs are accessible
Check file download permissions and network connection
Verify file save path and permissions
Note that some instrument separation results may be empty
Note the field differences between separate_vocal and split_stem types
Alternative Solutions
If you cannot use the callback mechanism, you can also use polling:
Poll Query Results Use the Get Vocal Separation Details endpoint to periodically query task status. We recommend querying every 30 seconds.