Upload Audio And Get Upload Audio
POST
https://api.sunosay.com/suno/music/upload-audio
Upload audio file
Request Header
Header Name | type | Required | Description |
---|---|---|---|
Authorization | string | true | request verification authorization |
Request Parameters
Params Name | type | Required | Description |
---|---|---|---|
audio_url | string | true | Must be original audio between 6 and 60 seconds long. |
Sample Parameters
{
"audio_url": "https://example.com/audio.mp3"
}
Response Body
Response Name | type | Description |
---|---|---|
code | number | Task creation code 200 means success other status values mean failure |
upload_task_id | string | Get the generated instrumental task_id |
message | string | Success message or failure error message |
Sample Response
{
"code": 200,
"upload_task_id": "4976bdbf8-b5c9-4eda-b5131-40f0e8fc875e",
"message": "ok!"
}
Examples Code
node
var axios = require('axios');
var data = '<body data here>';
var config = {
method: 'post',
url: 'https://api.sunosay.com/suno/music/upload-audio',
headers: {
Authorization: 'Bearer your-api-key',
},
data: {
audio_url: 'https://example.com/audio.mp3',
},
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});