Initiate a file conversion task using either an audio URL or file upload with optional format parameters and webhook callback.
Convert audio files to different formats with optional webhook support for asynchronous updates.Documentation Index
Fetch the complete documentation index at: https://docs.musicgpt.com/llms.txt
Use this file to discover all available pages before exploring further.
| Parameter | Type | Required | Description |
|---|---|---|---|
audio_url | String | Optional | The URL of an audio file to convert. Either audio_url or audio_file must be provided. |
audio_file | UploadFile | Optional | Upload the audio file directly. Either audio_url or audio_file must be provided. |
target_format | String | Yes | Desired output format. Supported: mp3, wav, flac, ogg, aac, webm. |
target_sr | Integer | Optional | Target sample rate in Hz. Defaults to original if not specified. |
target_bit_depth | Integer | Optional | Target bit depth. Options: 16, 24, 32. Defaults to 16. |
webhook_url | String | Optional | Callback URL to receive the result once conversion is complete. |
content-type: multipart/form-data
💡 Tip: Set a webhook_url to receive results automatically when your audio is ready.
🔐 Replace{path_to_your_audio_file},api_key, andwebhook_urlbefore executing.
output_file_path: Direct URL to download the converted audio file.conversion_type: Always File Conversion for this endpoint.conversion_id: A unique ID to track the request status.URL of the audio file to convert
"https://example.com/audio.mp3"
Target format for conversion
mp3, wav, flac, ogg, aac, webm "wav"
Audio file to upload and convert directly
Target sample rate in Hz (optional) - can be any of [8000, 16000, 22050, 24000, 32000, 44100, 48000, 96000, 192000]
8000, 16000, 22050, 24000, 32000, 44100, 48000, 96000, 192000 44100
Target bit depth (16, 24, or 32)
16, 24, 32 24
Callback URL for async processing results
"https://your-webhook-url.com/callback"