How to use Video Explicit Content Detection API with JavaScritp in 5 minutes?
Tags: api, ai, javascript, videomoderation
Published: 2023-01-11 15:08:13

*In this tutorial, you will learn how to use Video Explicit Content Detection in 5 minutes using JavaScript. Eden AI provides an easy and developer-friendly API that allows you to detect explicit contents in videos.*

## **What is Video Explicit Content Detection ?**

A [video explicit content detection API](https://www.edenai.co/feature/explicit-content-detection?referral=how-to-video-moderation-javascript) is a type of technology that is specifically designed to identify and classify potentially inappropriate or offensive content in video materials. This can include videos that contain explicit language, violence, or sexually suggestive content.

Video explicit content detection APIs typically use machine learning algorithms and other advanced techniques to analyze the visual and audio content of a video and determine whether it contains explicit material. They may also analyze other features of the video, such as its metadata, to help determine its appropriateness.

Video explicit content detection APIs are often used in a variety of applications, such as social media platforms, online marketplaces, and content management systems, to automatically identify and flag potentially inappropriate or offensive video content. This can help ensure that such content is not made available to a wider audience or is properly restricted or removed.

## **Getting Started with Video Moderation API**

The first step is to set Axios, a promise-based HTTP client for the browser and Node.js, that will allow you to call Eden AI API.

![https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/638f08881993bd518d9ca0cc_carbon(3).png](https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/638f08881993bd518d9ca0cc_carbon(3).png)

Next, you'll need to initialize the File System module in order to access local files on your computer.

![https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/638f088e8cc139623cbbce22_carbon(2).png](https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/638f088e8cc139623cbbce22_carbon(2).png)
Finally, you'll need to create your multipart/formdata parameters form:
![https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/638f09b0a3de914651c26a15_formdata.png](https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/638f09b0a3de914651c26a15_formdata.png)
## **How to use Video Explicit Content Detection API with JavaScript**

You are now ready to process your video file into Eden AI Video Explicit Content Detection API.

### **1. Get a Video Explicit Content Detection API Key on Eden AI**

To perform Video Explicit Content Detection in videos, you just need to create an account on [Eden AI](https://app.edenai.run/user/register?referral=how-to-video-moderation-javascript) for free. On the homepage, you will be able to get your **API key** with free credits offered by Eden AI.

![Eden AI platform - Get your API key](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qjw5etp8zzxdsnejpqml.png)
**[Get your API key for FREE](https://app.edenai.run/user/register?referral=how-to-video-moderation-javascript)**

### **2. Let’s Detect Explicit Content in your Video File**

Now that you have initialized the required JavaScript modules and got your API key, you will be able to detect explicit contents in videos. With Eden AI, you can choose from a wide range of engines you want for Video Explicit Content Detection. You can see Video Explicit Content Detection providers available on Eden AI on our documentation [here](https://docs.edenai.co/reference/video_explicit_content_detection_async_create?referral=how-to-video-moderation-javascript).

Here is the JavaScript code to add the form data parameters values for your request:

![https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/639335a3bff36d79e19778b4_carbon(38).png](https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/639335a3bff36d79e19778b4_carbon(38).png)

For example, we called two different Video Explicit Content Detection engines. Once the parameters values are passed, you can configure your request:

![https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/63933ba10c33a83bf84ac283_carbon(42).png](https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/63933ba10c33a83bf84ac283_carbon(42).png)

Then, you need to create launchJob() function that will execute POST request:

![https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/639317be6d8df4260a9af1b0_carbon(23).png](https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/639317be6d8df4260a9af1b0_carbon(23).png)

Finally, you have to create the getJob() function that will execute GET request with the Job ID of your POST request:

![https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/63933baaa727296558c4915f_carbon(41).png](https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/63933baaa727296558c4915f_carbon(41).png)

You will first get this response:

![https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/63468b71bcd332585a894d57_table-get-process.png](https://uploads-ssl.webflow.com/61e7d259b7746e3f63f0b6be/63468b71bcd332585a894d57_table-get-process.png)

Once the request is done (status : finished), you will be able to get the result for Explicit Content Detection task:

![Video Explicit Content Detection API with JavaScritp](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/gyqtezk84x5wkma7kl64.png)

## Benefits of using Video Explicit Content Detection API with Eden AI

Using Video Explicit Content Detection with Eden AI API is quick and easy.

![Multiple AIs in one API - Eden AI](https://dev-to-uploads.s3.amazonaws.com/uploads/articles/i3myjdcdurittrx5pgbg.gif)
### Save time and cost

We offer a unified API for all providers: simple and standard to use, with a quick switch between providers and an access to the specificic features of each provider

### Easy to integrate

The JSON output format is the same for all suppliers thanks to Eden AI's standardisation work. The response elements are also standardised thanks to Eden AI's powerful matching algorithms.

### Customization

With Eden AI you have the possibility to integrate a third party platform: we can quickly develop connectors. To go further and customize your Content Detection request with specific parameters, check out our [documentation](https://docs.edenai.co/reference/ocr_ocr_tables_async_create?referral=how-to-video-moderation-javascript).

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