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 Cutter
Trims an audio file using the specified start and end times.
POST
/
audio_cutter
Python
Copy
import requests
url = "https://api.musicgpt.com/api/public/v1/audio_cutter"
headers = {"Authorization": "<API_KEY>"}
# Option 1: Using audio URL
payload = {
"audio_url": "https://example.com/input_audio.mp3",
"start_time": 10500,
"end_time": 45000,
"output_extension": "mp3"
}
response = requests.post(url, headers=headers, data=payload)
print(response.json())
# Option 2: Upload local audio file
payload = {
"start_time": 5000,
"end_time": 20000,
"output_extension": "wav"
}
with open("input_audio.mp3", "rb") as f:
files = {"audio_file": f}
response = requests.post(url, headers=headers, data=payload, files=files)
print(response.json())
Copy
{
"success": true,
"conversion_id": "conv789",
"credit_estimate": 25,
"conversion_path": "https://example.com/trimmed_audio.mp3",
"message": "Audio trim task queued successfully"
}
Authorizations
Body
multipart/form-data
Response
200
application/json
Successfully initiated audio cut
The response is of type object
.
Python
Copy
import requests
url = "https://api.musicgpt.com/api/public/v1/audio_cutter"
headers = {"Authorization": "<API_KEY>"}
# Option 1: Using audio URL
payload = {
"audio_url": "https://example.com/input_audio.mp3",
"start_time": 10500,
"end_time": 45000,
"output_extension": "mp3"
}
response = requests.post(url, headers=headers, data=payload)
print(response.json())
# Option 2: Upload local audio file
payload = {
"start_time": 5000,
"end_time": 20000,
"output_extension": "wav"
}
with open("input_audio.mp3", "rb") as f:
files = {"audio_file": f}
response = requests.post(url, headers=headers, data=payload, files=files)
print(response.json())
Copy
{
"success": true,
"conversion_id": "conv789",
"credit_estimate": 25,
"conversion_path": "https://example.com/trimmed_audio.mp3",
"message": "Audio trim task queued successfully"
}
Assistant
Responses are generated using AI and may contain mistakes.