Picpurify empowers developers and businesses with a robust image moderation API that utilizes deep learning technology to identify and filter inappropriate content. Their service helps maintain a safe and secure online environment for your users by detecting a wide range of potentially harmful elements within images.

Authentication:

Picpurify utilizes API keys for authentication. You can obtain your free API key with a limited number of credits per month by creating an account on the Picpurify platform. Paid plans offer increased credit allowances and additional features.

Here's a breakdown of some key Picpurify Image API endpoints along with JavaScript example code snippets for each:

1. Image Moderation (Analyse)

  • This endpoint analyzes an image and detects various types of inappropriate content.
  • Type: POST
  • JavaScript Example:
const apiKey = 'YOUR_API_KEY';
const url = 'https://www.picpurify.com/analyse/1.1.0';

const data = {
    API_KEY: apiKey,
    task: 'porn_moderation, nudity_moderation', // Comma-separated tasks
    image: file, // Replace with your image file
};

const formData = new FormData();
for (const key in data) {
    formData.append(key, data[key]);
}

fetch(url, { method: 'POST', body: formData })
    .then((response) => response.json())
    .then((data) => {
        if (data.moderated === 1) {
            console.log('Image contains inappropriate content.');
        } else {
            console.log('Image is likely safe.');
        }
    })
    .catch((error) => console.error(error));

2. Face Detection (Face Detection)

  • This endpoint detects and locates human faces within an image.
  • Type: POST
  • JavaScript Example:
const apiKey = 'YOUR_API_KEY';
const url = 'https://www.picpurify.com/demo-face-gender-age.html'; // Free online demo

const data = {
    image: file, // Replace with your image file
};

const formData = new FormData();
for (const key in data) {
    formData.append(key, data[key]);
}

fetch(url, { method: 'POST', body: formData })
    .then((response) => response.text())
    .then((data) => {
        // Parse response to identify faces (refer to Picpurify documentation for details)
    })
    .catch((error) => console.error(error));

3. Additional Functionalities (Paid Plans)

  • Picpurify offers additional functionalities through their paid plans, including:
    • Moderation for a wider range of content (violence, gore, hate symbols, etc.)
    • Age and gender detection
    • Custom moderation models trained on your specific data

Explore More with Picpurify

Picpurify's free tier allows you to experiment with their image moderation capabilities. Explore their comprehensive documentation to delve deeper into each API endpoint, advanced features offered in paid plans, and pricing options. By integrating Picpurify's API, you can proactively moderate user-generated content and foster a safe and trustworthy environment for your online community.