POST
/
MusicAI
Generate Custom Music
curl --request POST \
  --url https://api.musicgpt.com/api/public/v1/MusicAI \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '{
  "prompt": "<string>",
  "music_style": "<string>",
  "lyrics": "<string>",
  "make_instrumental": false,
  "vocal_only": false,
  "voice_id": "<string>",
  "webhook_url": "<string>"
}'
{
  "success": true,
  "message": "Message published to queue",
  "task_id": "4fc2cdba-005d-4d14-a208-5fb02a2809da",
  "conversion_id_1": "05092d5c-f8b1-4c96-a4a3-45bc00de6268",
  "conversion_id_2": "52fcd3b6-3925-41ed-b4c6-aee17a29e40b",
  "eta": 154
}

Authorizations

Authorization
string
header
required

Body

application/json
prompt
string

A natural language prompt for music generation. Keep it under 280 characters for guaranteed results, but detailed—the clearer and more descriptive it is, the better the outcome.

music_style
string

Style of music to generate (e.g., Rock, Pop)

lyrics
string

Custom lyrics for the generated music

make_instrumental
boolean
default:false

Whether to make the music instrumental

vocal_only
boolean
default:false

Whether to generate only vocals of output audio

voice_id
string

Voice model to convert generated audio

webhook_url
string

URL for callback upon completion

Response

Successful response

success
boolean
message
string
task_id
string
conversion_id_1
string
conversion_id_2
string
eta
integer