Generate Lyrics

POST

https://api.sunosay.com/suno/lyrics/generate-lyrics

Generate random lyrics or extended lyrics


Request Header

Header NametypeRequiredDescription
Authorizationstringtruerequest verification authorization

Request Parameters

Params NametypeRequiredDescription
promptstringfalseSome 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 NametypeDescription
codenumberTask creation code 200 means success other status values ​​mean failure
task_idstringGet the generated lryrics task_id
messagestringSuccess 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);
  });