Skip to main content

Delete Image

Overview

This endpoint is used to delete an image using the image name.

Request

--request POST 'https://modelslab.com/api/v3/delete_image' \

Send a POST request to https://modelslab.com/api/v3/delete_image endpoint and pass the name of the image you want to delete to the image parameter of the request body.

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

Body Attributes

ParameterTypeDescription
keyStringYour API Key used for request authorization
request_idIntThe request id gotten while uploading image

Example

Body

Body Raw
{
"key": "",
"request_id": 2398
}

Request

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

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

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

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

Response

{
"status": "success",
"messege":"image deleted"
}