POST
/
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",
  "webhook_url": "https://example.com/my-webhook"
}

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

Authorizations

Authorization
string
header
required

Body

multipart/form-data

Response

200
application/json

Successfully initiated remix task

The response is of type object.