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.
Callback Timing
The system will send callback notifications in the following situations:- WAV format conversion completed
- WAV conversion task failed
- Error occurred during task processing
WAV format conversion has only one callback stage, providing the download URL upon completion
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:
Status Code Description
Callback status code indicating task processing result:
Status Code | Description |
---|---|
200 | Success - WAV conversion 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
WAV format audio file download URL (returned on success)
Callback Reception Examples
Here are example codes for receiving callbacks in various popular programming languages:- Node.js
- Python
- PHP
Best Practices
WAV Conversion Callback Configuration
- File Management: Implement proper file naming conventions for downloaded WAV files
- Storage Planning: Ensure adequate storage space for high-quality WAV files
- Quality Verification: Verify WAV file integrity after download
- Metadata Preservation: Maintain track information and metadata with WAV files
- Batch Processing: Consider batch conversion for multiple tracks
- Cleanup: Implement cleanup procedures for temporary files
WAV-Specific Considerations
- WAV files are typically larger than MP3 files due to lossless compression
- Download times may be longer due to file size
- Ensure sufficient bandwidth for WAV file downloads
- WAV format provides maximum audio quality for professional use
- Consider storage costs for large WAV file collections
Troubleshooting
Common issues specific to WAV conversion callbacks:Download Issues
Download Issues
- Verify the WAV URL is accessible and not expired
- Check network connectivity and bandwidth
- Ensure sufficient local storage space
- Verify download permissions and file paths
Quality and Format
Quality and Format
- Confirm the source audio quality meets WAV conversion requirements
- Check if the original audio file is corrupted
- Verify that the converted WAV maintains expected quality
- Test WAV file playback in different audio applications
File Management
File Management
- Implement proper file naming to avoid conflicts
- Monitor storage usage for WAV file collections
- Consider automated cleanup for old WAV files
- Verify file integrity after download completion
Alternative Solutions
If you cannot use the callback mechanism, you can also use polling:Poll WAV Results
Use the Get WAV Conversion Details interface to regularly query conversion task status. Recommend querying every 20 seconds.