Upload Audio
You can upload an audio file and get an audio URL. You can then use this audio URL for other tasks, such as the Suno AI Extend task.
Name
Value
Name
Type
Description
// Success, the task is complete
{
"audioURL": "https://cdn.apiframe.pro/songs/xxxxxxxxxxxxxxxxxxx.mp4"
}// Bad request
{
"errors": [{ msg: "Invalid request" }]
}// Invalid API Key
{}// A server error occured
{}const axios = require('axios');
const FormData = require('form-data');
const fs = require('fs');
let data = new FormData();
data.append('audio', fs.createReadStream('..../audio.mp4'));
let config = {
method: 'post',
maxBodyLength: Infinity,
url: 'https://api.apiframe.pro/upload-audio',
headers: {
'Authorization': 'YOUR_API_KEY',
...data.getHeaders()
},
data : data
};
axios.request(config)
.then((response) => {
console.log(JSON.stringify(response.data));
})
.catch((error) => {
console.log(error);
});
Last updated