API Documentation
Keep in mind
Features
- POSTMusic AI
- POSTCover Song
- POSTText To Speech
- POSTSound Generator
- POSTExtraction
- POSTVoice Changer
- POSTDenoise
- POSTDeecho
- POSTDereverb
- POSTFile Conversion
- POSTAudio Transcribe
- POSTKey & BPM Extraction
- POSTAudio to MIDI
- POSTAudio Cutter
- POSTAudio Speed Changer
- POSTAudio Mastering
- POSTRemix
- POSTExtend
- POSTInpaint
- POSTSing Over Instrumental
- GETLyrics Generator
Sample Request Endpoints
Conversion Endpoints
- POSTMUSIC AI
- POSTCover
- POSTVoice Changer
- POSTText To Speech
- POSTExtraction
- POSTSound Generator
- POSTDeNoise
- POSTDeEcho
- POSTDeReverb
- POSTFile Conversion
- POSTAudio Transcribe
- POSTExtract Key BPM
- POSTAudio To MIDI
- POSTAudio Cutter
- POSTAudio Speed Changer
- POSTAudio Mastering
- POSTRemix
- POSTExtend
- POSTInpaint
- POSTSing Over Instrumental
- GETLyrics Generator
Conversion Endpoints
Audio Mastering
Processes an input audio file to match the mastering characteristics of a reference track.
POST
/
audio_mastering
Python
Copy
import requests
url = "https://api.musicgpt.com/api/public/v1/audio_mastering"
headers = {"Authorization": "<<<api key>>>"}
# Option 1: Using URLs
payload = {
"audio_url": "https://example.com/input_audio.mp3",
"reference_audio_url": "https://example.com/reference_track.wav",
"output_extension": "wav",
"webhook_url": "http://your-webhook-url.com/callback"
}
response = requests.post(url, headers=headers, data=payload)
print(response.json())
# Option 2: Upload files
# with open("input.mp3", "rb") as input_file, open("ref.wav", "rb") as ref_file:
# files = {
# "audio_file": input_file,
# "reference_audio_file": ref_file
# }
# data = {
# "output_extension": "wav",
# "webhook_url": "http://your-webhook-url.com/callback"
# }
# response = requests.post(url, headers=headers, files=files, data=data)
# print(response.json())
Copy
{
"success": true,
"task_id": "master123",
"conversion_id": "conv456",
"credit_estimate": 150.75,
"eta": 300,
"message": "Mastering task queued successfully"
}
Authorizations
Body
multipart/form-data
Response
200
application/json
Successfully queued for mastering
The response is of type object
.
Python
Copy
import requests
url = "https://api.musicgpt.com/api/public/v1/audio_mastering"
headers = {"Authorization": "<<<api key>>>"}
# Option 1: Using URLs
payload = {
"audio_url": "https://example.com/input_audio.mp3",
"reference_audio_url": "https://example.com/reference_track.wav",
"output_extension": "wav",
"webhook_url": "http://your-webhook-url.com/callback"
}
response = requests.post(url, headers=headers, data=payload)
print(response.json())
# Option 2: Upload files
# with open("input.mp3", "rb") as input_file, open("ref.wav", "rb") as ref_file:
# files = {
# "audio_file": input_file,
# "reference_audio_file": ref_file
# }
# data = {
# "output_extension": "wav",
# "webhook_url": "http://your-webhook-url.com/callback"
# }
# response = requests.post(url, headers=headers, files=files, data=data)
# print(response.json())
Copy
{
"success": true,
"task_id": "master123",
"conversion_id": "conv456",
"credit_estimate": 150.75,
"eta": 300,
"message": "Mastering task queued successfully"
}
Assistant
Responses are generated using AI and may contain mistakes.