Skip to main content

Enterprise: Delete Model Endpoint

Overview

This endpoint is used to delete a model from your dedicated server.

Request

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

Send a POST request to https://stablediffusionapi.com/api/v1/enterprise/delete_model endpoint. Specify the ID(name) of the model to be deleted by using the model_id parameter in the request body.

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

Body Attributes

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

Example

Body

Body Raw
{
"key": "enterprise_api_key",
"model_id": "ckpt-model"
}

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'
};

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

Response

{
"status": "success",
"message": "Model deleted on server"
}