Skip to main content
POST
Python
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

content-type: multipart/form-data

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, and webhook_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: Always File Conversion for this endpoint.
  • conversion_id: A unique ID to track the request status.

Authorizations

Authorization
string
header
required

Body

multipart/form-data
audio_url
string
required

Input audio URL (supported format: YouTube URL).

Example:

"https://example.com/audio.mp3"

target_format
enum<string>
required

Target format for conversion

Available options:
mp3,
wav,
flac,
ogg,
aac,
webm
Example:

"wav"

audio_file
file

Audio file to upload and convert directly

target_sr
enum<integer>
default:44100

Target sample rate in Hz (optional) - can be any of [8000, 16000, 22050, 24000, 32000, 44100, 48000, 96000, 192000]

Available options:
8000,
16000,
22050,
24000,
32000,
44100,
48000,
96000,
192000
Example:

44100

target_bit_depth
enum<integer>

Target bit depth (16, 24, or 32)

Available options:
16,
24,
32
Example:

24

webhook_url
string

Callback URL for async processing results

Example:

"https://your-webhook-url.com/callback"

Response

Successfully initiated file conversion

success
boolean
task_id
string
conversion_id
string
output_path
string
credit_estimate
number<float>