Skip to main content

NSFW Prompt Check

Overview​

This endpoint is useful to check if a prompt has cp or nsfw content

Request​

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

Send a POST request to https://modelslab.com/api/check_nsfw_cp endpoint to check if an image is nsfw or not.

Attributes​

ParameterDescription
keyYour enterprise API Key used for request authorization.
promptThe prompt you want to check.

Example​

Body​

Body Raw
{
"key": "",
"prompt": "ultra realistic close up portrait ((beautiful pale cyberpunk female with heavy black eyeliner, nude)) , blue eyes, shaved side haircut, hyper detail, cinematic lighting, magic neon, dark red city, Canon EOS R3, nikon, f/1.4, ISO 200, 1/160s, 8K, RAW, unedited, symmetrical balance, in-frame, 8K"
}

Request​

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

var raw = JSON.stringify({
"key": "",
"init_image": "http://your-image-url.com"
});

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

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

Response​

{
"status": "success",
"is_cp": false,
"is_nsfw": true,
"original_prompt": "ultra realistic close up portrait ((beautiful pale cyberpunk female with heavy black eyeliner, nude)) , blue eyes, shaved side haircut, hyper detail, cinematic lighting, magic neon, dark red city, Canon EOS R3, nikon, f/1.4, ISO 200, 1/160s, 8K, RAW, unedited, symmetrical balance, in-frame, 8K",
"filtered_prompt": "ultra realistic close up portrait ((beautiful pale cyberpunk female with heavy black eyeliner, nude)) , blue eyes, shaved side haircut, hyper detail, cinematic lighting, magic neon, dark red city, Canon EOS R3, nikon, f/1.4, ISO 200, 1/160s, 8K, RAW, unedited, symmetrical balance, in-frame, 8K"
}