Skip to main content

Enterprise: Get All Models Endpoint

Overview

Enterprise: Get All Models endpoint returns a list of all the models available on your dedicated server.

This endpoint returns models' IDs and the date/time they have been loaded on your server.

Request

--request POST 'https://modelslab.com/api/v1/enterprise/get_all_models' \

Send a POST request to https://modelslab.com/api/v1/enterprise/get_all_models endpoint to obtain a list with the available public models and their IDs.

Watch the how-to video to see it in action.

Attributes

ParameterDescription
keyYour enterprise API Key used for request authorization

Example

Body

Body Raw
{
"key": "enterprise_api_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/v1/enterprise/get_all_models", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Response

{
"models": [
{
"load_data": "01/25/2023 11:52:22",
"model_id": "hf-model"
},
{
"load_data": "01/25/2023 12:34:16",
"model_id": "ckpt-model"
},
{
"load_data": "01/25/2023 12:50:48",
"model_id": "nckpt-model"
}
],
"status": "success"
}