Skip to main content

Fetch Queued Voice Endpoint

Overview

Fetch Queued Voice API fetches queued Voice

Usually more complex Voice generation requests take more time for processing. Such requests are being queued for processing and the output Voice are retrievable after some time.

Request

--request POST 'https://modelslab.com/api/v6/voice/fetch/{id}' \

Send a POST request to https://modelslab.com/api/v6/voice/fetch/{id} endpoint to return the corresponding queued Voice. Where {id} is the ID returned together with the Voice URL in the response upon its generation.

Attributes

ParameterDescription
keyYour API Key used for request authorization

Example

Body

Body Raw
{
"key": ""
}

Request

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

var raw = JSON.stringify({
"key": ""
});

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

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

Response

Example Response
{
"status": "success",
"id": 12202888,
"output": [
"https://pub-8b49af329fae499aa563997f5d4068a4.r2.dev/generations/e5cd86d3-7305-47fc-82c1-7d1a3b130fa4-0.png"
]
}