POST
/
dereverb
import requests

url = "https://api.example.com/api/public/v1/dereverb"
headers = {"Authorization": "<API_KEY>", "accept": "application/json"}

# Option 1: URL
response = requests.post(url, headers=headers, json={"audio_url": "https://example.com/audio.m4a"})

# Option 2: File Upload
with open("audio.m4a", "rb") as f:
    files = {"audio_file": f}
    response = requests.post(url, headers=headers, files=files)

print(response.json())
{
  "success": true,
  "task_id": "dereverb789",
  "conversion_id": "conv456",
  "eta": -1,
  "credit_estimate": 100.1
}

Remove reverb from an input audio file with optional webhook callback for asynchronous updates.


๐ŸŽท Endpoint

POST /dereverb

This endpoint removes reverberation (echo) from an uploaded or linked audio file. A webhook_url can be provided for asynchronous task status updates.


๐Ÿ”ข Request Parameters

ParameterTypeRequiredDescription
audio_urlStringOptionalThe URL of an audio file to clean. Either audio_url or audio_file must be provided.
audio_fileUploadFileOptionalUpload the audio file directly. Either audio_url or audio_file must be provided.
webhook_urlStringOptionalCallback URL for async response.

๐Ÿ’ก Note: Either audio_url or audio_file must be provided โ€” one is required.


โ–ถ๏ธ Sample Output

Listen to a real sample output:

Download Audio

๐Ÿงช Try it Yourself

Visit the Dereverb 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

curl -X POST "https://api.musicgpt.com/api/public/v1/Dereverb" \
-H "accept: application/json" \
-H "Authorization: <api_key>" \
-F "audio_url=https://www.youtube.com/watch?v=jGflUbPQfW8" \
-F "webhook_url=http://webhook.musicgpt.com"

๐Ÿ Python

import requests

url = "https://api.musicgpt.com/api/public/v1/Dereverb"

headers = {
    "accept": "application/json",
    "Authorization": "<api_key>"
}

input_audio_file = open("{path_to_your_audio_file}", "rb")

payload = {
    "audio_url": "",
    "webhook_url": "http://abcd.requestcatcher.com/test"
}

response = requests.post(url=url,
                         headers=headers,
                         data=payload,
                         files={"audio_file": input_audio_file})

print(response.status_code, response.json())

๐Ÿ” Replace {path_to_your_audio_file}, api_key, and webhook_url before executing.


๐Ÿ“ฅ Sample Response

โœ… Success (200 OK)

{
  "success":true,
  "task_id":"e99d00bb-2ddf-4279-a15e-6e22801ee575",
  "conversion_id":"fbcf0c40-a33d-40aa-8c1d-7bb6f9df0b0f",
  "eta":40,
  "credit_estimate":0.48,
  "message":"Message published to queue",
  "status":"IN_QUEUE"
}

๐Ÿ“ฅ Webhook Response

โœ… Success (200 OK)

{
  "success": true, 
  "conversion_type": "Dereverb", 
  "task_id": "e99d00bb-2ddf-4279-a15e-6e22801ee575", 
  "conversion_id": "fbcf0c40-a33d-40aa-8c1d-7bb6f9df0b0f", 
  "audio_path": "files/4efbdeff-48a2-401c-a9e6-8a2ffe465487.wav", 
  "noreverb": "https://lalals.s3.amazonaws.com/conversions/e99d00bb-2ddf-4279-a15e-6e22801ee575_reverb.mp3", 
  "noreverb_wav": "https://lalals.s3.amazonaws.com/conversions/e99d00bb-2ddf-4279-a15e-6e22801ee575_reverb.wav", 
  "reverb": "https://lalals.s3.amazonaws.com/conversions/e99d00bb-2ddf-4279-a15e-6e22801ee575_noreverb.mp3", 
  "reverb_wav": "https://lalals.s3.amazonaws.com/conversions/e99d00bb-2ddf-4279-a15e-6e22801ee575_noreverb.wav", 
  "message": "de_reverb conversion Completed", 
  "conversion_duration": 136.83045351473922, 
  "conversion_cost": "0.48"
}

โŒ Common Errors

  • 422 Unprocessable Entity: Both audio_url and audio_file cannot be None.
  • 500 Internal Server Error: A server error occurred during processing.

๐Ÿ“ž Webhook Response

Once reverb removal is completed, the webhook receives:

{
  "success": true,
  "conversion_type": "Dereverb",
  "task_id": "123abc-dereverb",
  "conversion_id": "456xyz-dereverb",
  "audio_path": "files/audio_original.wav",
  "no_reverb": "https://musicgpt.s3.amazonaws.com/conversions/123abc-dereverb_no_reverb.mp3",
  "no_reverb_wav": "https://musicgpt.s3.amazonaws.com/conversions/123abc-dereverb_no_reverb.wav",
  "reverb": "https://musicgpt.s3.amazonaws.com/conversions/123abc-dereverb_reverb.mp3",
  "reverb_wav": "https://musicgpt.s3.amazonaws.com/conversions/123abc-dereverb_reverb.wav",
  "message": "dereverb conversion Completed",
  "conversion_duration": 275.48,
  "conversion_cost": 2.75
}

You can stream or download the cleaned audio and isolated reverb in both .mp3 and .wav formats.


โ–ถ๏ธ Sample Output

Listen to a real sample output:

Input Audio :
Output :
  • echo

  • no_echo


Authorizations

Authorization
string
header
required

Body

multipart/form-data

Response

200
application/json

Successfully initiated dereverberation

The response is of type object.