File Conversion
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.
๐ต Endpoint
This endpoint processes an uploaded or linked audio file and converts it to a specified output format. You may also define optional parameters like sample rate and bit depth.
๐ข Request Parameters
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. |
โถ๏ธ Sample Output
Listen to a real sample output:
Download Audio๐งช Try it Yourself
Visit the File Conversion Endpoint Explorer to try your own text samples.
๐ก Tip: Set a
webhook_url
to receive results automatically when your audio is ready.
๐ค Sample Request
๐ cURL
๐ Python
๐ Replace
{path_to_your_audio_file}
,api_key
, andwebhook_url
before executing.
๐ฅ Sample Response
โ Success (200 OK)
๐ฅ Webhook Response
โ Success (200 OK)
โ Common Errors
- 400 Bad Request: Invalid request. Possibly due to missing parameters or unsupported formats.
- 500 Internal Server Error: Server encountered an error during processing.
๐ Webhook Response
Once the file conversion is completed, the webhook receives:
๐ Output Fields
output_file_path
: Direct URL to download the converted audio file.conversion_type
: AlwaysFile Conversion
for this endpoint.conversion_id
: A unique ID to track the request status.
Authorizations
Body
Response
Successfully initiated file conversion
The response is of type object
.