Generate Lyrics
POST
https://api.sunosay.com/suno/lyrics/generate-lyrics
Generate random lyrics or extended lyrics
Request Header
Header Name | type | Required | Description |
---|---|---|---|
Authorization | string | true | request verification authorization |
Request Parameters
Params Name | type | Required | Description |
---|---|---|---|
prompt | string | false | Some of the lyrics are described in less than 200 words (will expand the lyrics based on the currently entered description) |
Sample Parameters
{
"prompt": "Wandering through the hazy corridors of memory"
}
Response Body
Response Name | type | Description |
---|---|---|
code | number | Task creation code 200 means success other status values mean failure |
task_id | string | Get the generated lryrics task_id |
message | string | Success message or failure error message |
Sample Response
{
"code": 200,
"task_id": "470e701149-76bdbf8-b5c9-4eda-73f4d953",
"message": "ok!"
}
Examples Code
node
var axios = require('axios');
var config = {
method: 'post',
url: 'https://api.sunosay.com/suno/lyrics/generate-lyrics',
headers: {
Authorization: 'Bearer your-api-key',
},
data: {
prompt: 'Wandering through the hazy corridors of memory',
},
};
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data));
})
.catch(function (error) {
console.log(error);
});