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.
POST
https://api.apiframe.pro/upload-audio
Headers
Name
Value
Content-Type
multipart/form-data
Authorization*
Your APIFRAME API Key
Body
Name
Type
Description
audio
*
binary
The audio file you want to upload. Maximum 2MB and 60 seconds!
Response
// Success, the task is complete
{
"audioURL": "https://cdn.apiframe.pro/songs/xxxxxxxxxxxxxxxxxxx.mp4"
}
Code samples
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
Was this helpful?