Python
import requests
url = "https://api.musicgpt.com/api/public/v1/deecho"
headers = {
"Authorization": "<API_KEY>"
}
data = {
"webhook_url": "https://example.com/my-webhook"
}
# Option 1: audio_url
data["audio_url"] = "<YOUR_AUDIO_URL>"
response = requests.post(url, headers=headers, data=data)
# Option 2: File Upload
# with open("song.mp3", "rb") as f:
# files = {"audio_file": f}
# response = requests.post(url, headers=headers, data=data, files=files)
print(response.json())curl --request POST \
--url https://api.musicgpt.com/api/public/v1/deecho \
--header 'Authorization: <api-key>' \
--header 'Content-Type: multipart/form-data' \
--form 'audio_url=https://www.youtube.com/watch?v=example123' \
--form 'audio_file=<string>' \
--form webhook_url=http://your-webhook-url.com/callback \
--form 0.audio_file='@example-file' \
--form 1.audio_file='@example-file'const form = new FormData();
form.append('audio_url', 'https://www.youtube.com/watch?v=example123');
form.append('audio_file', '<string>');
form.append('webhook_url', 'http://your-webhook-url.com/callback');
form.append('0.audio_file', '{
"fileName": "example-file"
}');
form.append('1.audio_file', '{
"fileName": "example-file"
}');
const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
options.body = form;
fetch('https://api.musicgpt.com/api/public/v1/deecho', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.musicgpt.com/api/public/v1/deecho",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_url\"\r\n\r\nhttps://www.youtube.com/watch?v=example123\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_file\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\nhttp://your-webhook-url.com/callback\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"0.audio_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"1.audio_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: multipart/form-data; boundary=---011000010111000001101001"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.musicgpt.com/api/public/v1/deecho"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_url\"\r\n\r\nhttps://www.youtube.com/watch?v=example123\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_file\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\nhttp://your-webhook-url.com/callback\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"0.audio_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"1.audio_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "multipart/form-data; boundary=---011000010111000001101001")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.musicgpt.com/api/public/v1/deecho")
.header("Authorization", "<api-key>")
.header("Content-Type", "multipart/form-data; boundary=---011000010111000001101001")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_url\"\r\n\r\nhttps://www.youtube.com/watch?v=example123\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_file\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\nhttp://your-webhook-url.com/callback\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"0.audio_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"1.audio_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.musicgpt.com/api/public/v1/deecho")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'multipart/form-data; boundary=---011000010111000001101001'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_url\"\r\n\r\nhttps://www.youtube.com/watch?v=example123\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_file\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\nhttp://your-webhook-url.com/callback\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"0.audio_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"1.audio_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"success": true,
"task_id": "deecho789",
"conversion_id": "conv456",
"eta": -1,
"credit_estimate": 100.1
}{
"success": false,
"error": "Either audio_url or audio_file must be provided."
}{
"success": false,
"error": "Internal Server Error"
}Features
Deecho
Initiate an echo removal task using either an audio URL or file upload with optional webhook callback.
POST
/
v1
/
deecho
Python
import requests
url = "https://api.musicgpt.com/api/public/v1/deecho"
headers = {
"Authorization": "<API_KEY>"
}
data = {
"webhook_url": "https://example.com/my-webhook"
}
# Option 1: audio_url
data["audio_url"] = "<YOUR_AUDIO_URL>"
response = requests.post(url, headers=headers, data=data)
# Option 2: File Upload
# with open("song.mp3", "rb") as f:
# files = {"audio_file": f}
# response = requests.post(url, headers=headers, data=data, files=files)
print(response.json())curl --request POST \
--url https://api.musicgpt.com/api/public/v1/deecho \
--header 'Authorization: <api-key>' \
--header 'Content-Type: multipart/form-data' \
--form 'audio_url=https://www.youtube.com/watch?v=example123' \
--form 'audio_file=<string>' \
--form webhook_url=http://your-webhook-url.com/callback \
--form 0.audio_file='@example-file' \
--form 1.audio_file='@example-file'const form = new FormData();
form.append('audio_url', 'https://www.youtube.com/watch?v=example123');
form.append('audio_file', '<string>');
form.append('webhook_url', 'http://your-webhook-url.com/callback');
form.append('0.audio_file', '{
"fileName": "example-file"
}');
form.append('1.audio_file', '{
"fileName": "example-file"
}');
const options = {method: 'POST', headers: {Authorization: '<api-key>'}};
options.body = form;
fetch('https://api.musicgpt.com/api/public/v1/deecho', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.musicgpt.com/api/public/v1/deecho",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_url\"\r\n\r\nhttps://www.youtube.com/watch?v=example123\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_file\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\nhttp://your-webhook-url.com/callback\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"0.audio_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"1.audio_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--",
CURLOPT_HTTPHEADER => [
"Authorization: <api-key>",
"Content-Type: multipart/form-data; boundary=---011000010111000001101001"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.musicgpt.com/api/public/v1/deecho"
payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_url\"\r\n\r\nhttps://www.youtube.com/watch?v=example123\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_file\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\nhttp://your-webhook-url.com/callback\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"0.audio_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"1.audio_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<api-key>")
req.Header.Add("Content-Type", "multipart/form-data; boundary=---011000010111000001101001")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.musicgpt.com/api/public/v1/deecho")
.header("Authorization", "<api-key>")
.header("Content-Type", "multipart/form-data; boundary=---011000010111000001101001")
.body("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_url\"\r\n\r\nhttps://www.youtube.com/watch?v=example123\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_file\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\nhttp://your-webhook-url.com/callback\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"0.audio_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"1.audio_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.musicgpt.com/api/public/v1/deecho")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<api-key>'
request["Content-Type"] = 'multipart/form-data; boundary=---011000010111000001101001'
request.body = "-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_url\"\r\n\r\nhttps://www.youtube.com/watch?v=example123\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_file\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\nhttp://your-webhook-url.com/callback\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"0.audio_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"1.audio_file\"; filename=\"example-file\"\r\nContent-Type: application/octet-stream\r\n\r\n{\r\n \"fileName\": \"example-file\"\r\n}\r\n-----011000010111000001101001--"
response = http.request(request)
puts response.read_body{
"success": true,
"task_id": "deecho789",
"conversion_id": "conv456",
"eta": -1,
"credit_estimate": 100.1
}{
"success": false,
"error": "Either audio_url or audio_file must be provided."
}{
"success": false,
"error": "Internal Server Error"
}Remove echo from input audio with optional webhook support for async updates.
This endpoint processes an audio file to reduce or eliminate echo effects.
Endpoint
POST /v1/deecho
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
audio_url | String | Optional | The URL of an audio file to remove echo from. 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. |
webhook_url | String | Optional | Callback URL for async response. |
💡 Note: You must provide eitheraudio_urloraudio_file— not both asNone.
content-type: multipart/form-data
Sample Output
Listen to a real sample output: Download AudioTry 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 = {
"Authorization": "<<<api key>>>"
}
# Option 1: URL
payload = {
"audio_url": "https://example.com/audio.m4a",
"webhook_url": ""
}
response = requests.post(url, headers=headers, data=payload)
print(response.json())
# Option 2: File Upload
# payload = {
# "webhook_url": "https://www.test.requestcatcher.com/test"
# }
# with open("audio.m4a", "rb") as f:
# files = {"audio_file": f}
# response = requests.post(url, headers=headers, data=payload, files=files)
# print(response.json())
🔐 Replace{path_to_your_audio_file},api_key, andwebhook_urlbefore 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_urlandaudio_filecannot beNone. - 500 Internal Server Error: An error occurred on the server.
Payload and Request Formation
Authorizations
Body
multipart/form-data
- Option 1
- Option 2
⌘I