Skip to main content

Enterprise: Sync Model Endpoint

Overview

The Enterprise: This endpoint is important for users with multiple servers and want to sync models between two servers

Request

--request POST 'https://stablediffusionapi.com/api/v1/enterprise/sync_models' \

Send a POST request to https://stablediffusionapi.com/api/v1/enterprise/sync_models endpoint to sync models of one enterprise server with another server

Attributes

ParameterDescription
keyYour enterprise API Key used for request authorization.
sync_keyEnterprise key of the second server you want to sync.

Example

Body

Body Raw
{
"key": "enterprise_api_key",
"sync_key": "enterprise_api_key"
}

Request

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

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

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

model_reload("https://stablediffusionapi.com/api/v1/enterprise/sync_models", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));

Response

{
"status": "success",
"message": "3 Models synced successfully",
"model_list" : [
"stable-diffusion",
"dreamlike",
"midjourney"
]
}