Profanity Detection and Cleaning API
最終更新
curl "https://events-front.mixeder.net/v2/wordetect/?key=YOUR_API_KEY&text=This is a bad word&method=json"{
"original": "This is a bad word",
"cleaned": "This is a *** word"
}curl "https://events-front.mixeder.net/v2/wordetect/?key=YOUR_API_KEY&text=This is ugly&method=xml"<?xml version="1.0" encoding="UTF-8"?>
<response>
<original>This is bad</original>
<cleaned>This is ****</cleaned>
</response>curl "https://events-front.mixeder.net/v2/wordetect/?key=YOUR_API_KEY&text=Bad example&method=plain"*** examplecurl "https://events-front.mixeder.net/v2/wordetect/?key=YOUR_API_KEY&text=Bad words here&method=containsprofanity""true"curl "https://events-front.mixeder.net/v2/wordetect/?key=YOUR_API_KEY&text=Special bad words&add=special&fill_char=#&method=json"{
"original": "Special bad words",
"cleaned": "####### bad words"
}$apiUrl = "https://events-front.mixeder.net/v2/wordetect/";
$text = "This is inappropriate content.";
$headers = [
"api-key: YOUR_API_KEY"
];
$options = [
'http' => [
'header' => implode("\r\n", $headers),
'method' => 'GET',
'content' => http_build_query(['text' => $text, 'method' => 'json'])
]
];
$context = stream_context_create($options);
$response = file_get_contents($apiUrl, false, $context);
echo $response;curl -X POST "https://events-front.mixeder.net/v2/wordetect/" \
-H "Content-Type: application/x-www-form-urlencoded" \
-d "api-key=YOUR_API_KEY" \
-d "text=Some bad words here" \
-d "method=json"{
"original": "Some bad words here",
"cleaned": "Some *** words here"
}"API Key not provided.""API key is wrong"