Skip to main content
POST
/
v1
/
Remix
Python
import requests

url = "https://api.musicgpt.com/api/public/v1/Remix"
headers = {"Authorization": "<API_KEY>"}
data = {
  "prompt": "Make it sound like Lo-fi with chill beats",
  "lyrics": "It's a brand new day",
  "gender": "female",
  "title": "My Generated Track",
  "webhook_url": "https://example.com/my-webhook"
}

# Option 1: audio_url
files = {}
data["audio_url"] = "<YOUR_AUDIO_URL>"
response = requests.post(url, headers=headers, data=data, files=files)

# 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/Remix \
--header 'Authorization: <api-key>' \
--header 'Content-Type: multipart/form-data' \
--form audio_url=https://mybucket.s3.amazonaws.com/song.mp3 \
--form 'prompt=Make it sound like Lo-fi with chill beats' \
--form 'audio_file=<string>' \
--form 'lyrics=It'\''s a brand new day' \
--form 'title=<string>' \
--form gender=female \
--form generate_album_cover=false \
--form webhook_url=https://example.com/my-webhook \
--form 0.audio_file='@example-file' \
--form 1.audio_file='@example-file'
const form = new FormData();
form.append('audio_url', 'https://mybucket.s3.amazonaws.com/song.mp3');
form.append('prompt', 'Make it sound like Lo-fi with chill beats');
form.append('audio_file', '<string>');
form.append('lyrics', 'It's a brand new day');
form.append('title', '<string>');
form.append('gender', 'female');
form.append('generate_album_cover', 'false');
form.append('webhook_url', 'https://example.com/my-webhook');
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/Remix', 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/Remix",
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://mybucket.s3.amazonaws.com/song.mp3\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prompt\"\r\n\r\nMake it sound like Lo-fi with chill beats\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=\"lyrics\"\r\n\r\nIt's a brand new day\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"title\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"gender\"\r\n\r\nfemale\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"generate_album_cover\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\nhttps://example.com/my-webhook\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/Remix"

payload := strings.NewReader("-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"audio_url\"\r\n\r\nhttps://mybucket.s3.amazonaws.com/song.mp3\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prompt\"\r\n\r\nMake it sound like Lo-fi with chill beats\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=\"lyrics\"\r\n\r\nIt's a brand new day\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"title\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"gender\"\r\n\r\nfemale\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"generate_album_cover\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\nhttps://example.com/my-webhook\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/Remix")
.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://mybucket.s3.amazonaws.com/song.mp3\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prompt\"\r\n\r\nMake it sound like Lo-fi with chill beats\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=\"lyrics\"\r\n\r\nIt's a brand new day\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"title\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"gender\"\r\n\r\nfemale\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"generate_album_cover\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\nhttps://example.com/my-webhook\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/Remix")

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://mybucket.s3.amazonaws.com/song.mp3\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"prompt\"\r\n\r\nMake it sound like Lo-fi with chill beats\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=\"lyrics\"\r\n\r\nIt's a brand new day\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"title\"\r\n\r\n<string>\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"gender\"\r\n\r\nfemale\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"generate_album_cover\"\r\n\r\nfalse\r\n-----011000010111000001101001\r\nContent-Disposition: form-data; name=\"webhook_url\"\r\n\r\nhttps://example.com/my-webhook\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,
  "message": "Remix request submitted successfully",
  "task_id": "task-remix-001",
  "conversion_id_1": "remix-a1b2",
  "conversion_id_2": "remix-c3d4",
  "eta": 42,
  "credit_estimate": 47.5
}
{
"success": false,
"error": "Either audio_file or audio_url must be provided."
}
{
"success": false,
"error": "Internal Server Error"
}
Remix Audio Using Prompt and Optional Lyrics This endpoint allows users to remix an input audio file or URL using a descriptive prompt, optional lyrics, and a gender selection for vocal tone.

Endpoint

POST /v1/Remix

Request Parameters

ParameterTypeRequiredDescription
titleStringOptionalTitle of the generated music
audio_fileUploadFileOptionalUpload the audio file directly. Required if audio_url is not provided.
audio_urlStringOptionalPublic URL or S3 path to audio. Required if audio_file is not provided.
promptString✅ YesDescribes how the audio should be transformed.
lyricsStringOptionalLyrics to guide remix or vocal generation. Max 2000 characters.
genderStringOptionalVocal tone. One of: male, female, neutral.
webhook_urlStringOptionalCallback URL for async response.
💡Note: Either audio_file or audio_url must be provided.
content-type: multipart/form-data

Sample Output

Listen to a real output: Prompt: remix in classical slow vibe - audio input : Moana How Far We will Go. Download Audio

Try it Yourself

Use the Remix Endpoint Explorer to test this endpoint live.

Sample Request

cURL

curl -X POST "https://api.musicgpt.com/api/public/v1/Remix" \
-H "accept: application/json" \
-H "Authorization: <api_key>" \
-F "audio_file=@/path/to/your/audio.mp3" \
-F "prompt=Make it sound like Lo-fi with chill beats" \
-F "lyrics=It's a brand new day" \
-F "gender=female" \
-F "webhook_url=https://example.com/my-webhook"

Python

import requests

url = "https://api.musicgpt.com/api/public/v1/Remix"
headers = {"Authorization": "<API_KEY>"}
data = {
  "prompt": "Make it sound like Lo-fi with chill beats",
  "lyrics": "It's a brand new day",
  "gender": "female",
  "webhook_url": "https://example.com/my-webhook"
}

# Option 1: audio_url
data["audio_url"] = "https://mybucket.s3.amazonaws.com/song.mp3"
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())

Sample Response

Success (200 OK)

{
  "success": true,
  "message": "Remix request submitted successfully",
  "task_id": "task-remix-001",
  "conversion_id_1": "remix-a1b2",
  "conversion_id_2": "remix-c3d4",
  "eta": 42,
  "credit_estimate": 47.5
}

Webhook Response

{
  "success": true,
  "conversion_type": "Remix",
  "task_id": "task-remix-001",
  "conversion_id": "remix-a1b2",
  "conversion_path": "https://lalals.s3.amazonaws.com/conversions/2104a105-2572-4412-b6fb-f67b0382582a.mp3",
  "conversion_path_wav": "https://lalals.s3.amazonaws.com/conversions/2104a105-2572-4412-b6fb-f67b0382582a.wav",
  "conversion_duration": 162.44,
  "is_flagged": false,
  "reason": "",
  "lyrics": "...",
  "lyrics_timestamped": "..."
}

Webhook Delivery

Once the generation is complete, webhooks will be triggered to deliver the following:

Standard Requests (non-instrumental):

  • 2 (webhooks) x Remix conversion details (one per version)
  • 2 (webhooks) x Lyrics with timestamp data
  • 1 Album Cover Image
Webhook responses include detailed metadata including task_id, conversion_id, audio files (conversion_path), lyrics etc.

Common Errors

  • 422 Unprocessable Entity Missing required field prompt, or neither audio_file nor audio_url provided.
  • 500 Internal Server Error An error occurred during processing or task queueing.

The /Remix endpoint produces a downloadable or streamable remixed audio file with optional lyrical overlays and style transformations.

Payload and Request Formation

Authorizations

Authorization
string
header
required

Body

multipart/form-data
audio_url
string
required

Input audio URL (supported format: YouTube URL).

Example:

"https://mybucket.s3.amazonaws.com/song.mp3"

prompt
string
required

Describes how the audio should be transformed.

Example:

"Make it sound like Lo-fi with chill beats"

audio_file
file

Uploaded audio file to be remixed.

lyrics
string

Optional lyrics to guide vocal generation.

Maximum string length: 2000
Example:

"It's a brand new day"

title
string

Title of the generated music track

gender
enum<string>

Voice style if vocal content is generated.

Available options:
male,
female,
neutral
Example:

"female"

generate_album_cover
boolean
default:false

Whether to generate an album cover for the generated audio

webhook_url
string

Callback URL for async processing results.

Example:

"https://example.com/my-webhook"

Response

Successfully initiated remix task

success
boolean
task_id
string
conversion_id_1
string
conversion_id_2
string
eta
integer

Estimated processing time in seconds

credit_estimate
number<float>
message
string