Gaalech-API is a fast and accurate tool for detecting Hindi profanity. Below is a code snippet on how to use the API.
try {
const response = await fetch('https://galeech-api.herokanon39.workers.dev', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ text: }),
});
if (!response.ok) {
throw new Error('Network response was not ok');
}
const data = await response.json();
console.log(data);
} catch (error) {
console.error('There was a problem with the request:', error);
}