Skip to main content

Reload Model Endpoint

Overview

Reload Model API is used to reload an idle model that has not been used for more than 7 days.

After 7 days of inactivity a model will be deleted from the inference server.

To reload a model and start using it again, you can make an API call to the Reload Model endpoint.

caution

It will take 2 minutes to reload a model.

Request

--request POST 'https://modelslab.com/api/v6/images/model_reload' \

Send a POST request to https://modelslab.com/api/v6/images/model_reload endpoint to reload a specific model specified by the model_id parameter in the request body.

Attributes

ParameterDescription
keyYour API Key used for request authorization
model_idThe ID of the model to be reloaded.

Example

Body

Body Raw
{
"key": "",
"model_id": "model_id"
}

Request

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

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

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

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