MusicAPI
HomeDocs
HomeDocs
  1. sonic
  • Introduction
  • Credits Usage Guide
  • Music API FAQ & Troubleshooting
  • Common Scenarios
  • Error handling
  • sonic
    • Sonic Instructions
    • create music
      POST
    • extend music
      POST
    • concat music
      POST
    • cover music
      POST
    • create persona
      POST
    • create music with persona
      POST
    • upload music
      POST
    • get music
      GET
  • studio(Unavailable)
    • Studio Instructions
    • description mode (Use case1)
      POST
    • extend mode (Use case2)
      POST
    • custom mode (Use case3)
      POST
    • instrumental mode (Use case4)
      POST
    • get music
      GET
  • lyrics generation
    • Make Lyrics
      POST
  • nuro
    • Nuro Instruction
    • Error handling
    • create vocal music
      POST
    • create instrument music
      POST
    • get music
      GET
  1. sonic

extend music

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
Task type, can be create_music, extend_music, concat_music, cover_music, extend_upload_music, persona_music
custom_mode
boolean 
required
If you want to customize the lyrics, this option should be true.
prompt
string 
required
song lyrics
title
string 
optional
song title
tags
string 
optional
song styles
continue_clip_id
string 
required
The clip id of the song to be extended
continue_at
integer 
required
The starting number of seconds to extend
mv
string 
required
Example
{
  "task_type": "extend_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",
  "continue_clip_id": "a533515b-56c9-4eb2-8cb8-7f3dfa165eb8",
  "continue_at": 30,
  "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":"extend_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",
    "continue_clip_id": "a533515b-56c9-4eb2-8cb8-7f3dfa165eb8",
    "continue_at": 30,
    "mv": "sonic-v3-5"
}'

Responses

🟢200success
application/json
Body
message
string 
required
task_id
string 
required
Example
{
  "message": "success",
  "task_id": "468d0e42-f7a6-40ce-9a4c-37db56b13b99"
}
Previous
create music
Next
concat music
Built with