How to Filter Unwanted User Content
Tags: ai, api, nsfw, contentfilteration
Published: 2023-10-10 08:02:16

## **What is Unwanted User Content Filtration?**
Filtering unwanted content refers to the process of identifying and removing inappropriate, harmful or undesired content from websites, social media, digital platforms, or any other online environment. 

This process is crucial for maintaining a safe and user-friendly online space, protecting users from harmful or offensive material, and complying with community guidelines, legal regulations and ethical standards.

‍

## **Step-by-Step Guide to Filter Unwanted User Content**
‍
**Step 1. Obtain your Eden AI API Key**
To get started with the Eden AI API, you need to [sign up for an account on the Eden AI platform](https://app.edenai.run/user/register?referral=how-to-filter-unwanted-user-content). Once registered, you will get an API key which you can use to call the different endpoints of the Eden AI API.

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/189e1lwbcfcflqyrvjv3.jpg)

**[Get your API Key for FREE](https://app.edenai.run/user/register?referral=how-to-filter-unwanted-user-content)**



**Step 2. Try Different Types of Content Filtration Models**
1. **[Text Moderation](https://www.edenai.co/feature/text-moderation-apis?referral=how-to-filter-unwanted-user-content)**
Text moderation is a fundamental aspect of text content filtration. It involves scanning text for offensive, sexually explicit or suggestive content. It also checks if there is any content of self-harm, violence, racist or hate speech.

Here’s a sample Python code you can use to call the Eden AI API for text moderation:

```
import requests
import json

# Enter your API Key obtained from Eden AI here
API_KEY = "YOUR_PRIVATE_KEY"

# Define the text you want to moderate
text = "SAMPLE TEXT"

url = "https://api.edenai.run/v2/text/moderation"

# Payload with microsoft provider
payload = {
	"show_original_response": False,
	"providers": "microsoft",
	"text": text,
}
headers = {
	"Authorization": f"Bearer {API_KEY}"
}
response = requests.post(url, json=payload, headers=headers)
result = json.loads(response.text)

# Print the standardized result from microsoft provider
print(result["microsoft"])
```


2. **[Explicit Content Detection](https://www.edenai.co/feature/explicit-content-detection-apis?referral=how-to-filter-unwanted-user-content)**
Explicit Content Detection is focused on identifying adult-only content in images that is generally inappropriate for people under the age of 18 and includes nudity, sexual activity, pornography, violence, gore content, etc. 

Here’s a sample Python code you can use to call the Eden AI API for explicit content detection:

```
import requests
import json

# Enter your API Key obtained from Eden AI here
API_KEY = "YOUR_PRIVATE_KEY"

url = "https://api.edenai.run/v2/image/explicit_content"

# Data with microsoft provider
data = {
    "show_original_response": False,
    "providers": "microsoft",
}

# Define the image you want to analyze
files = {
    "file": open("logo_detection.jpeg", 'rb')
}
headers = {
    "Authorization": f"Bearer {API_KEY}"
}
response = requests.post(url, data=data, headers=headers, files=files)
result = json.loads(response.text)

# Print the standardized result from microsoft provider
print(result["microsoft"])
```



3. **[AI Content Detection](https://www.edenai.co/feature/ai-content-detection?referral=how-to-filter-unwanted-user-content)**
The AI Content Detection is a tool designed to determine whether a given text was generated by an artificial intelligence chatbot, or a Language Model (LLM).

Here’s a sample Python code you can use to call the Eden AI API for AI Content Detection:

```
import requests
import json

# Enter your API Key obtained from Eden AI here
API_KEY = "YOUR_PRIVATE_KEY"

# Define the text you want to detect
text = "SAMPLE TEXT"

url = "https://api.edenai.run/v2/text/ai_detection"

# Payload with Sapling provider
payload = {
	"show_original_response": False,
	"providers": "sapling",
	"text": text,
}

headers = {
"Authorization": f"Bearer {API_KEY}"
}
response = requests.post(url, json=payload, headers=headers)
result = json.loads(response.text)

# Print the standardized result from sapling provider
print(result["sapling"])
```


‍
**Step 3. Set up your account for more API calls**
We offer $10 free credits to start with. Buy additional credits if needed:

![Image description](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2tlsn0yzojp8c2ldxyl7.png)



**Step 4. Start scaling and monitoring the performance of your API**
As your application grows, monitor the performance and scalability of each type of content filtration APIs integrated through Eden AI. Ensure that the API usage remains within acceptable limits and explore options for scaling up or optimizing API calls if necessary. Regularly review the available APIs for Text Moderation, Explicit Content Detection, and AI Content Detection on Eden AI to take advantage of any new updates or additions.

‍

## **Use cases for using Unwanted Content Filtration**
Text-to-Speech (TTS) APIs have a wide range of use cases across various industries and applications. Here are some common use cases:

‍
**1. Internet Security and Parental Controls**
Unwanted content filtration plays a crucial role in enhancing internet security and facilitating parental controls. It is used to block access to websites and online content that may pose security risks or contain age-inappropriate material. This helps ensure a safer online environment for children and allows parents to control their children's internet access effectively.

‍

**2. Email Filtering**
Unwanted content filtration in email systems is essential for identifying and mitigating spam emails, which often contain unsolicited and potentially harmful content. Additionally, it helps in blocking phishing attempts and safeguarding users from fraudulent schemes and phishing attacks that seek to obtain sensitive information.

‍

**3. Chat and Messaging Apps**
Content filtering is used in chat and messaging applications to automatically censor or block offensive language and inappropriate content in chats and comments. This helps maintain a respectful and safe communication environment.

‍

**4. Social Media**
Content filtration algorithms are utilized by social media platforms to automatically detect and remove offensive content, hate speech, and spam from user-generated posts and comments. This ensures a positive and respectful online community for users.

‍

## **Conclusion**
Unwanted content filtration is essential for maintaining a safe and user-friendly online environment. This can be done using text moderation, explicit content detection and AI content detection. To safeguard both users and brand reputation, constant adaptation to developing technology and user education are essential to ensure a positive digital environment.

‍

**[Create your Account on Eden AI](https://app.edenai.run/user/register?referral=how-to-filter-unwanted-user-content)**