Create
POST
https://api.sunoapi.com/api/v2/suno/v3.0/random/create-lyrics-song
The core API to generates random songs with lyrics based on description.
POST /api/v2/suno/v3.0/random/create-lyrics-song
Sample Request
{
"description": "an anthemic dancepop song about dancing all night long"
}
Request Body
Name | Type | Required | Default |
---|---|---|---|
description | string | true | "" |
description
The description of the song.
{
"code": 200,
"data": {
"task_id": "b09d79f9-bd8f-4d51-8e8e-a7e1cb22f139"
},
"message": "success"
}
Response Body
Name | Type | Description |
---|---|---|
code | number | the HTTP status code of the response |
data | object | the data of the response |
message | string | the message of the response |
data
Name | Type | Description |
---|---|---|
task_id | string | the task ID of the song generation job |
task_id
The task ID of the song generation job, which can be used to query the progress of the job and retrieve the generated song. You can use this ID to retrieve the song from the API clip.
Examples
const axios = require("axios")
const config = {
method: "post",
url: "https://api.sunoapi.com/api/v2/suno/v3.0/random/create-lyrics-song",
headers: {
"Content-Type": "application/json",
Authorization: "Bearer <your-token>",
},
data: {
description: "an anthemic dancepop song about dancing all night long",
},
}
axios(config)
.then(function (response) {
console.log(JSON.stringify(response.data))
})
.catch(function (error) {
console.log(error)
})