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

upload music

POST
https://api.musicapi.ai/api/v1/sonic/upload

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json
url
string 
required
the online music url you want to upload,It must be copyright-free music and be between 6 and 60 seconds long.
Example
{
  "url": "https://audio.jukehost.co.uk/Ij5SXdAJKLg4tggS8T1xIH1Z0DuOWq5e.mp3"
}

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/upload' \
--header 'Content-Type: application/json' \
--data-raw '{
  "url":"https://audio.jukehost.co.uk/Ij5SXdAJKLg4tggS8T1xIH1Z0DuOWq5e.mp3"
}'

Responses

🟢200success
application/json
Body
code
integer 
required
clip_id
string 
required
The sonic clip id after uploading
message
string 
required
Example
{
  "code": 0,
  "clip_id": "string",
  "message": "string"
}
Previous
create music with persona
Next
get music
Built with