Skip to main content

Lyrics Generator Endpoint

Overview

The Lyrics Generator endpoint enables you to generate lyrics by providing a prompt


Request

--request POST 'https://modelslab.com/api/v6/voice/lyrics_generator' \

Make a POST request to https://modelslab.com/api/v6/voice/lyrics_generator endpoint and pass the required parameters as a request body.

Body Attributes

ParameterDescriptionValues
keyThe API key used for authenticating your request.String
promptprompt with which lyrics should be generated.Text
webhookA URL where the API will send a POST request once the audio generation is complete.URL
track_idAn ID returned in the API response, used to identify webhook requestsIntegral value

Example

Body

Body
{   
"key": "",
"prompt":"tokyo",
"webhook": null,
"track_id": null
}

Request

var myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
"key": "",
"prompt":"tokyo",
"webhook": null,
"track_id": null
});

var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};

fetch("https://modelslab.com/api/v6/voice/lyrics_generator", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Response

{
"status": "success",
"generationTime": 1.904285192489624,
"id": 334166,
"output": [
"https://pub-3626123a908346a7a8be8d9295f44e26.r2.dev/generations/a3f8a04c-26c1-485c-b3b5-5c6244a0d395.txt"
],
"proxy_links": [
"https://pub-3626123a908346a7a8be8d9295f44e26.r2.dev/generations/a3f8a04c-26c1-485c-b3b5-5c6244a0d395.txt"
],
"meta": {
"prompt": "tokyo",
"webhook": null,
"id": null,
"filename": "a3f8a04c-26c1-485c-b3b5-5c6244a0d395",
"temp": "no",
"track_id": null,
"base64": "no"
}
}