Upload Audio And Get Upload Audio

POST

https://api.sunosay.com/suno/music/upload-audio

Upload audio file


Request Header

Header NametypeRequiredDescription
Authorizationstringtruerequest verification authorization

Request Parameters

Params NametypeRequiredDescription
audio_urlstringtrueMust be original audio between 6 and 60 seconds long.

Sample Parameters

{
  "audio_url": "https://example.com/audio.mp3"
}

Response Body

Response NametypeDescription
codenumberTask creation code 200 means success other status values ​​mean failure
upload_task_idstringGet the generated instrumental task_id
messagestringSuccess 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);
  });