- Introduction
- Credits Usage Guide
- Music API FAQ & Troubleshooting
- Common Scenarios
- Error handling
- sonic
- studio
- lyrics generation
- nuro
create music with persona
POST
https://api.musicapi.ai/api/v1/sonic/create
Request
Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.Example:
Authorization: Bearer ********************
Body Params application/json
task_type
string
required
custom_mode
boolean
required
prompt
string
required
title
string
optional
tags
string
optional
persona_id
string
required
mv
string
required
Example
{
"task_type": "persona_music",
"custom_mode": true,
"prompt": "[Verse]\nStars they shine above me\nMoonlight softly glows\nWhispers in the night sky\nDreams that only grow\n\n[Verse 2]\nMidnight winds are calling\nCarrying a tune\nHeartbeats echo softly\nDancing with the moon\n\n[Chorus]\nStarry night starry night\nLet your light ignite ignite\nBright as day bright as day\nGuide my way guide my way\n\n[Verse 3]\nShadows move and twinkle\nNighttime come alive\nMystery in the heavens\nStories that survive\n\n[Bridge]\nMagic fills the darkness\nWonder in the air\nEvery star a secret\nIn the sky I stare\n\n[Chorus]\nStarry night starry night\nLet your light ignite ignite\nBright as day bright as day\nGuide my way guide my way",
"title": "Starts",
"tags": "pop",
"persona_id": "c08806c1-34fa-4290-a78d-0c623eb1dd1c",
"mv": "sonic-v3-5"
}
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.musicapi.ai/api/v1/sonic/create' \
--header 'Content-Type: application/json' \
--data-raw '{
"task_type":"persona_music",
"custom_mode": true,
"prompt": "[Verse]\nStars they shine above me\nMoonlight softly glows\nWhispers in the night sky\nDreams that only grow\n\n[Verse 2]\nMidnight winds are calling\nCarrying a tune\nHeartbeats echo softly\nDancing with the moon\n\n[Chorus]\nStarry night starry night\nLet your light ignite ignite\nBright as day bright as day\nGuide my way guide my way\n\n[Verse 3]\nShadows move and twinkle\nNighttime come alive\nMystery in the heavens\nStories that survive\n\n[Bridge]\nMagic fills the darkness\nWonder in the air\nEvery star a secret\nIn the sky I stare\n\n[Chorus]\nStarry night starry night\nLet your light ignite ignite\nBright as day bright as day\nGuide my way guide my way",
"title": "Starts",
"tags": "pop",
"persona_id":"c08806c1-34fa-4290-a78d-0c623eb1dd1c",
"mv": "sonic-v3-5"
}'
Responses
🟢200success
application/json
Body
message
string
required
task_id
string
required
Example
{
"message": "success",
"task_id": "81ed9f60-56ae-48c1-9c46-33a8220dfca7"
}
Modified at 2024-12-27 16:58:25