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
Callback 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 description
Task ID, consistent with the taskId returned when you submitted the task
Vocal separation result information, returned on success. Fields vary based on separation type
separate_vocal Type Fields
Original audio file URL
Separated vocal audio file URL
Separated instrumental audio file URL (no vocals)
split_stem Type Fields
Original audio file URL
Separated vocal audio file URL
Separated backing vocals audio file URL
Separated drums audio file URL
Separated bass audio file URL
Separated guitar audio file URL
Separated keyboard audio file URL
Separated percussion instruments audio file URL
Separated string instruments audio file URL
Separated synthesizer audio file URL
Separated sound effects audio file URL
Separated brass instruments audio file URL
Separated woodwind instruments audio file URL
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
Vocal Separation Callback Configuration
- Multi-track Management: Organize separated tracks with clear naming conventions
- Quality Assessment: Verify separation quality for each track type
- Storage Organization: Create folder structures for different separation projects
- Batch Processing: Implement efficient batch downloads for multiple tracks
- Track Analysis: Analyze separated tracks for remix and production purposes
- 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: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.