POST
/
MusicAI
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>",
  "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
}

MusicAI lets you generate original music compositions with minimal input. Whether you’re a developer looking to integrate music into an app, a content creator seeking custom tracks, or a musician experimenting with ideas β€” this tool lets you:

  • πŸŽ™ Compose songs with your own lyrics and style
  • 🎢 Generate complete tracks using only a short description (prompt)
  • 🧠 Apply custom AI voice conversion
  • πŸ” Get instant feedback or receive results via webhook

MusicAI is built for speed, flexibility, and creativity. Submit your request and receive professional-sounding tracks in minutes.


πŸ“‘ Endpoint

POST /MusicAI

This is the primary endpoint for initiating music generation requests.


▢️ Sample Output

Listen to a real sample output:

Prompt: a song about greenery, nature and forest.

Download Audio

πŸ§ͺ Try it Yourself

Visit the MusicAI Endpoint Explorer to play around β€” set your payload, hit send, and listen to the generated results live.

You can test both lyrics-based and prompt-based generation methods.

🎁 Don’t forget: you’ll receive two unique tracks for every request β€” explore both to find your perfect match!


πŸ› οΈ Request Parameters

ParameterTypeRequiredDescription
promptStringOptionalA natural language prompt for music generation
music_styleStringOptionalStyle of music to generate (e.g., Rock, Pop)
lyricsStringOptionalCustom lyrics to be used in the music
voice_idStringOptionalVoice model to apply on generated music
webhook_urlStringOptionalWebhook URL to receive a callback with the final audio result

🎚️ Modes of Generation

🎡 Custom Mode

Supply both lyrics and music_style to craft a personalized track with your exact preferences.

✍️ Prompt Mode

Just provide a prompt, and let the model generate everything for you β€” from lyrics to melody and instrumentation.

voice_id and webhook_url work in both modes for more control and automation.


πŸ“₯ Sample Request

🐍 Python

import requests

url = "https://api.musicgpt.com/api/public/v1/MusicAI"
headers = {
    "Authorization": "<api_key>",
    "Content-Type": "application/json"
}
payload = {
    "prompt": "song about a football match between Man City and Arsenal",
    "music_style": "Pop",
    "webhook_url": "https://abcd.requestcatcher.com/",
    "lyrics": "",
    "voice_id": "Drake"
}

response = requests.post(url, json=payload, headers=headers)
print(response.json())

πŸ“€ Sample Response

βœ… Success (200 OK)

{
"success": true,
"message": "Message published to queue",
"task_id": "8e058b85-6c22-41cc-a6ed-1e91ed73e34b",
"conversion_id_1": "2872d9a6-4abe-4a8f-a04f-5540c4ef0a1a",
"conversion_id_2": "dda98922-d5e9-4fc9-accd-4fc1f0729234",
"eta": 76,
"credit_estimate": 0.99
}

πŸ“ž Webhook Response

When the generation is complete, you’ll receive the following at your webhook URL:

{
  "success": true, 
  "conversion_type": "Music AI", 
  "task_id": "8e058b85-6c22-41cc-a6ed-1e91ed73e34b", 
  "conversion_id": "2872d9a6-4abe-4a8f-a04f-5540c4ef0a1a", 
  "conversion_path": "https://lalals.s3.amazonaws.com/conversions/2872d9a6-4abe-4a8f-a04f-5540c4ef0a1a.mp3", 
  "conversion_path_wav": "https://lalals.s3.amazonaws.com/conversions/2872d9a6-4abe-4a8f-a04f-5540c4ef0a1a.wav", 
  "conversion_duration": 213.99510204081633, 
  "is_flagged": false, 
  "reason": "", 
  "lyrics": "[Verse 1]\nI walked this path a thousand times\nWhen my heart was whole\nThese branches held our promises\nBut now they're letting go\n[Chorus]\nEvery damn pine needle points me back to you\nEvery fallen leaf reminds me of the truth\nAnd I can't escape these woods we used to know\n'Cause every damn pine needle points me back to you\n[Verse 2]\nThe moss still grows where we first kissed\nBehind that crooked tree\nI tear it up with shaking hands\nBut it won't set me free\nThese fucking branches mock my pain\nWith every breeze that blows\n[Chorus]\nEvery damn pine needle points me back to you\nEvery fallen leaf reminds me of the truth\nAnd I can't escape these woods we used to know\n'Cause every damn pine needle points me back to you\n[Post-chorus]\n(Points me back, points me back)\n(Every step leads back to you)\n[Bridge]\nMaybe one day I'll walk here\nAnd feel nothing at all\nJust trees being trees\nJust wind being wind\nJust me being me again\n[Verse 3]\nThe sunlight filters through the green\nLike it always did before\nBut nothing feels the same since you\nWon't walk here anymore\n[Chorus]\nEvery damn pine needle points me back to you\nEvery fallen leaf reminds me of the truth\nAnd I can't escape these woods we used to know\n'Cause every damn pine needle points me back to you\n[Outro]\n(Points me back to you)\n(Points me back to you)", 
  "lyrics_timestamped": "[{\"index\": 0, \"text\": \"[Verse 1]\", \"start\": 13374, \"end\": 13374}, {\"index\": 1, \"text\": \"I walked this path a thousand times\", \"start\": 13374, \"end\": 17089}, {\"index\": 2, \"text\": \"When my heart was whole\", \"start\": 17089, \"end\": 20062}, {\"index\": 3, \"text\": \"These branches held our promises\", \"start\": 20062, \"end\": 23777}, {\"index\": 4, \"text\": \"But now they're letting go\", \"start\": 23777, \"end\": 26006}, {\"index\": 6, \"text\": \"[Chorus]\", \"start\": 26006, \"end\": 26749}, {\"index\": 7, \"text\": \"Every damn pine needle points me back to you\", \"start\": 27492, \"end\": 31207}, {\"index\": 8, \"text\": \"Every fallen leaf reminds me of the truth\", \"start\": 34179, \"end\": 38638}, {\"index\": 9, \"text\": \"And I can't escape these woods we used to know\", \"start\": 38638, \"end\": 45325}, {\"index\": 10, \"text\": \"'Cause every damn pine needle points me back to you\", \"start\": 45325, \"end\": 52012}, {\"index\": 12, \"text\": \"[Verse 2]\", \"start\": 52012, \"end\": 54241}, {\"index\": 13, \"text\": \"The moss still grows where we first kissed\", \"start\": 54241, \"end\": 57957}, {\"index\": 14, \"text\": \"Behind that crooked tree\", \"start\": 58700, \"end\": 60186}, {\"index\": 15, \"text\": \"I tear it up with shaking hands\", \"start\": 61672, \"end\": 63901}, {\"index\": 16, \"text\": \"But it won't set me free\", \"start\": 64644, \"end\": 68359}, {\"index\": 17, \"text\": \"These fucking branches mock my pain\", \"start\": 68359, \"end\": 72074}, {\"index\": 18, \"text\": \"With every breeze that blows\", \"start\": 72074, \"end\": 74303}, {\"index\": 20, \"text\": \"[Chorus]\", \"start\": 74303, \"end\": 75046}, {\"index\": 21, \"text\": \"Every damn pine needle points me back to you\", \"start\": 75046, \"end\": 81734}, {\"index\": 22, \"text\": \"Every fallen leaf reminds me of the truth\", \"start\": 81734, \"end\": 86192}, {\"index\": 23, \"text\": \"And I can't escape these woods we used to know\", \"start\": 86935, \"end\": 94365}, {\"index\": 24, \"text\": \"'Cause every damn pine needle points me back to you\", \"start\": 94365, \"end\": 99567}, {\"index\": 26, \"text\": \"[Post-chorus]\", \"start\": 100310, \"end\": 102539}, {\"index\": 27, \"text\": \"(Points me back, points me back)\", \"start\": 102539, \"end\": 118143}, {\"index\": 28, \"text\": \"(Every step leads back to you)\", \"start\": 118143, \"end\": 122601}, {\"index\": 30, \"text\": \"[Bridge]\", \"start\": 122601, \"end\": 124087}, {\"index\": 31, \"text\": \"Maybe one day I'll walk here\", \"start\": 124087, \"end\": 127802}, {\"index\": 32, \"text\": \"And feel nothing at all\", \"start\": 130031, \"end\": 133746}, {\"index\": 33, \"text\": \"Just trees being trees\", \"start\": 134489, \"end\": 140434}, {\"index\": 34, \"text\": \"Just wind being wind\", \"start\": 143406, \"end\": 145635}, {\"index\": 35, \"text\": \"Just me being me again\", \"start\": 147121, \"end\": 150093}, {\"index\": 37, \"text\": \"[Verse 3]\", \"start\": 150836, \"end\": 152322}, {\"index\": 38, \"text\": \"The sunlight filters through the green\", \"start\": 152322, \"end\": 156038}, {\"index\": 39, \"text\": \"Like it always did before\", \"start\": 156038, \"end\": 157524}, {\"index\": 40, \"text\": \"But nothing feels the same since you\", \"start\": 159010, \"end\": 161982}, {\"index\": 41, \"text\": \"Won't walk here anymore\", \"start\": 162725, \"end\": 164954}, {\"index\": 43, \"text\": \"[Chorus]\", \"start\": 164954, \"end\": 165697}, {\"index\": 44, \"text\": \"Every damn pine needle points me back to you\", \"start\": 165697, \"end\": 170155}, {\"index\": 45, \"text\": \"Every fallen leaf reminds me of the truth\", \"start\": 172384, \"end\": 179072}, {\"index\": 46, \"text\": \"And I can't escape these woods we used to know\", \"start\": 179072, \"end\": 183530}, {\"index\": 47, \"text\": \"'Cause every damn pine needle points me back to you\", \"start\": 185759, \"end\": 190217}, {\"index\": 49, \"text\": \"[Outro]\", \"start\": 190960, \"end\": 194676}, {\"index\": 50, \"text\": \"(Points me back to you)\", \"start\": 194676, \"end\": 199134}, {\"index\": 51, \"text\": \"(Points me back to you)\", \"start\": 199134, \"end\": 206564}]", 
  "title": "Contradiction"}

🎧 Note: You will receive two separate webhook responses, each with a unique conversion_id for the two generated versions.


Payload and Request Formation

Authorizations

Authorization
string
header
required

Body

application/json

Response

200
application/json

Successful response

The response is of type object.