POST
/
VoiceChanger
Python
import requests

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

payload = {
    "audio_url": "<string>",
    "voice_id": "<string>",
    "remove_background": "<int>",
    "pitch": "<int>",
    "webhook_url": "<string>"
}

# For file upload instead of URL:
# files = {'audio_file': open('filepath', 'rb')}

headers = {
    "Authorization": "<API Key>"
}

response = requests.post(url, data=payload, headers=headers)
# For file upload:
# response = requests.post(url, data=payload, files=files, headers=headers)

print(response.text)
{
  "success": true,
  "task_id": "84038e1e-3687-4f7a-9c55-692754b125ee",
  "conversion_id": "e3631817-165d-4f17-a7e2-7008d200ff3e",
  "eta": 22
}

Authorizations

Authorization
string
header
required

Body

multipart/form-data
audio_url
string
required

URL of audio file to process

Example:

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

voice_id
string
required

Voice model ID

Example:

"demo-voice-id"

audio_file
file

Audio file to upload

remove_background
enum<integer>
default:0

1 to remove background noise, 0 to keep

Available options:
0,
1
pitch
integer
default:0

Pitch adjustment (-12 to +12)

Required range: -12 <= x <= 12
webhook_url
string

Callback URL

Example:

"https://example.com/callback"

Response

Successful response

success
boolean
task_id
string
conversion_id
string
eta
integer