POST
/
deecho
import requests

url = "https://api.example.com/api/public/v1/deecho"
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": "deecho789",
  "conversion_id": "conv456",
  "eta": -1,
  "credit_estimate": 100.1
}

Remove echo from input audio with optional webhook support for async updates.


๐ŸŽง Endpoint

POST /deecho

This endpoint processes an audio file to reduce or eliminate echo effects. You can specify a webhook_url to receive a callback when processing completes.


๐Ÿ”ข Request Parameters

ParameterTypeRequiredDescription
audio_urlStringOptionalThe URL of an audio file to remove echo from. 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: You must provide either audio_url or audio_file โ€” not both as None.


โ–ถ๏ธ Sample Output

Listen to a real sample output:

Download Audio

๐Ÿงช Try it Yourself

Visit the Deecho 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/Deecho" \
-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/Deecho"

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":"938a071a-a5f5-40df-8eeb-972edcff26c4",
  "conversion_id":"e53b1bb5-381c-4e6f-844d-6a604002483c",
  "eta":59,
  "credit_estimate":0.48,
  "message":"Message published to queue",
  "status":"IN_QUEUE"
}

๐Ÿ“ฅ Webhook Response

โœ… Success (200 OK)

{
  "success": true, 
  "conversion_type": "Deecho", 
  "task_id": "938a071a-a5f5-40df-8eeb-972edcff26c4", 
  "conversion_id": "e53b1bb5-381c-4e6f-844d-6a604002483c", 
  "audio_path": "files/8fd19e25-88c2-49e9-9641-7214cbe99a4f.wav", 
  "no_echo": "https://lalals.s3.amazonaws.com/conversions/938a071a-a5f5-40df-8eeb-972edcff26c4_noecho.mp3", 
  "no_echo_wav": "https://lalals.s3.amazonaws.com/conversions/938a071a-a5f5-40df-8eeb-972edcff26c4_noecho.wav", 
  "echo": "https://lalals.s3.amazonaws.com/conversions/938a071a-a5f5-40df-8eeb-972edcff26c4_echo.mp3", 
  "echo_wav": "https://lalals.s3.amazonaws.com/conversions/938a071a-a5f5-40df-8eeb-972edcff26c4_echo.wav", 
  "message": "de_echo conversion Completed", 
  "conversion_duration": 136.82721088435375, 
  "conversion_cost": "0.48"
}

โŒ Common Errors

  • 422 Unprocessable Entity: Both audio_url and audio_file cannot be None.
  • 500 Internal Server Error: An error occurred on the server.

๐Ÿ“ž Webhook Response

When the echo removal process completes, the webhook receives:

{
  "success": true,
  "conversion_type": "Deecho",
  "task_id": "8a73983c-96f4-4fd2-966c-96644e57139a",
  "conversion_id": "7cf8e607-7237-48d6-8d1c-6e518e58abdf",
  "audio_path": "files/1f465668-781f-4b5e-b3f1-0220c7d3ee15.wav",
  "no_echo": "https://musicgpt.s3.amazonaws.com/conversions/8a73983c-96f4-4fd2-966c-96644e57139a_noecho.mp3",
  "no_echo_wav": "https://musicgpt.s3.amazonaws.com/conversions/8a73983c-96f4-4fd2-966c-96644e57139a_noecho.wav",
  "echo": "https://musicgpt.s3.amazonaws.com/conversions/8a73983c-96f4-4fd2-966c-96644e57139a_echo.mp3",
  "echo_wav": "https://musicgpt.s3.amazonaws.com/conversions/8a73983c-96f4-4fd2-966c-96644e57139a_echo.wav",
  "message": "de_echo conversion Completed",
  "conversion_duration": 311.14,
  "conversion_cost": 3.12
}

You can download or stream both the processed (no echo) and extracted echo layers in .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 echo removal

The response is of type object.