# Moderation API Plugin

**URL:** <https://meta.discourse.org/t/moderation-api-plugin/348828>\
**Category:** Plugin\
**Tags:** moderation\
**Created:** [January 24, 2025, 3:11pm UTC](https://meta.discourse.org/t/moderation-api-plugin/348828 "2025-01-24T15:11:18Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![ModerationAPI](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/moderationapi/32/478518_2.png) [@ModerationAPI](https://meta.discourse.org/u/ModerationAPI)\
**Post date:** [January 24, 2025, 3:11pm UTC](https://meta.discourse.org/t/moderation-api-plugin/348828/1 "2025-01-24T15:11:18Z")

</div>

| | | |
| --- | --- | --- |
| ℹ | **Summary** | The **Discourse Moderation API Plugin** enhances your Discourse forum with automated moderation capabilities. Leverages the Moderation API’s battle-tested detection engine and includes an improved moderation dashboard to 10x moderator efficiency. |
| 🛠 | **Repository Link** | [https://github.com/moderation-api/discourse-moderation-api](https://github.com/moderation-api/discourse-moderation-api) |
| 📖 | **Install Guide** | [How to install plugins in Discourse](https://meta.discourse.org/t/install-plugins-in-discourse/19157) |

  

## 🛠 Highlighted Features

Moderation API is a full stack moderation solution.

**Automated Moderation Actions**

- Automatically flag comments and topics.
- Choose from 20+ pre-built models for common use cases or build your own.
- Detect toxicity, NSFW content, PII, spam, self-promotion, illegal activity, and more.
- Set custom thresholds for automated flagging.

**LLM-Powered Detection**

- Integrate your [community guidelines](https://meta.discourse.org/guidelines) into an AI agent.
- Utilize AI as the first line of defense or as a trusted moderator to flag comments.

**Custom Model Training**

- Develop your own AI models for the highest accuracy in moderation.
- Use moderator actions as feedback to train and refine models.
- Continuously enhance automated flagging through machine learning.

**Enhanced Review Queue**

- Optionally use Moderation API’s review queue for a streamlined and modern moderation experience.
- Create multiple review queues tailored to different languages, categories, or specific purposes.
- Develop moderation workflows for escalating content.
- Assign moderators to specific review queues for efficient management.

**Dashboard Analytics**

- Monitor AI activities and outcomes through the Moderation API dashboard.
- Gain insights into common issues and identify areas for improvement.

**Seamless Integration**

- Easily integrates with existing Discourse workflows and user roles.
- Choose between the Discourse review queue or Moderation API’s review queue.
- Utilizes built-in moderation actions from Discourse.

* * *

## 🚀 Configuration

Follow these steps to configure the Moderation API Plugin:

**Create a Project in Moderation API**

- Navigate to your Moderation API Dashboard.
- Create a new project and select the labels you wish to detect.

 ![Creating a new project](https://global.discourse-cdn.com/meta/original/4X/5/4/f/54fec2b7fe984869c3ef6c66d36f475336305708.png)

**(Optional) Test and Adjust Thresholds**

- Use the threshold sliders to determine the strictness of your moderation.
- Test the API response in the playground.

 ![Adjusting flagging thresholds](https://global.discourse-cdn.com/meta/original/4X/0/d/a/0da8370f840023ebd2675b3cf3d248cbee734f79.png)

**Set API Key**

- Locate your API key under Integrate in your project dashboard.
- In the Admin panel of Discourse, navigate to Settings \> Moderation API.
- Paste your API key into the Moderation API Key field.
- Save the changes.

**Enable the Plugin**

- Select your flagging behaviour (see options below). You can start with “nothing” to test out the plugin without performing any actions.
- Press enable plugin to start analyzing new posts. The plugin does not analyze any pre-existing content.

**(Optional) Add Your [Community Guidelines](https://meta.discourse.org/guidelines)**

- Go to the Model Studio in Moderation API.
- Create a new AI agent.
- Incorporate your guidelines as rules for the agent. If you have extensive guidelines, consider creating multiple agents.
- Add the agent to your project.

 ![Adding guidelines to AI agents](https://global.discourse-cdn.com/meta/original/4X/a/8/2/a82b2d3325653aa624072b8600bbf6fa2b607f3c.png)

* * *

## 🚩 Flagging Behaviors

The plugin offers four different flagging behaviors, determining the actions taken when the Moderation API flags a comment.

### 1. Flag (Default Behavior)

The plugin bot adds an Inappropriate flag to the comment, following your Discourse configuration. Typically, this means the comment appears in the review queue, but it may not be immediately hidden until a moderator approves it or additional users flag the comment. Review your flag-related settings in Discourse for customization.

### 2. Queue for Review

The comment is instantly hidden and added to the review queue for moderators to approve or reject.

### 3. Block Post

The comment is never posted. The author receives an error message indicating that the comment was blocked by the automated moderation system. (You can customize the error message.)

### 4. Nothing

No immediate actions are taken. The comment is analyzed and will appear in the Moderation API dashboard if flagged. This option is useful for testing the Moderation API before fully enabling the plugin.

* * *

## ✅ TODO

- Enable actions from Moderation API’s review queue to remove content from Discourse.
- Sync actions from Discourse’s review queue with the review queue in Moderation API.
- Allow separate moderation projects for different categories.
- Flag content using a selected Discourse flagging category (currently using Inappropriate).

* * *

### 🔧 Settings

Below is a table of available settings for the Moderation API Plugin along with their descriptions:

| Setting | Description |
| --- | --- |
| Enable Moderation API | Controls whether the plugin is active.  
**Default:** Disabled |
| Flagging Behavior | What happens when content is flagged:  
• Queue for review  
• Flag post  
• Block post  
• Nothing  
**Default:** Flag post |
| Block Message | The message shown to users when their post is blocked.  
**Default:** “Your post has been blocked by our moderation system.” |
| Notify on Post Queue | Send notifications when posts are queued for review.  
**Default:** Enabled |
| Check Private Messages | Apply moderation to private messages.  
**Default:** Disabled |
| Skip Groups | User groups that bypass moderation checks.  
**Default:** None |
| Skip Categories | Forum categories that bypass moderation checks.  
**Default:** None |
| API Key | Your Moderation API authentication key.  
**Default:** None |

## 💳 Subscriptions

You can install the plugin immediately and take advantage of our **free tier** or **30-day trial**. For extended features and higher usage limits, explore our [subscription options](https://moderationapi.com/pricing).

* * *

## 📚 Documentation

- [Read the Full Documentation Here](https://docs.moderationapi.com/get-started/introduction)

* * *

## 🛠 Support

- **Get Support:** [support@moderationapi.com](mailto:support@moderationapi.com)
- **Request a Feature:** [Feature Requests](https://moderationapi.com/sales)
- **Report an Issue:** [Report here](mailto:support@moderationapi.com)

  

* * *

**Disclaimer:** While the Discourse Moderation API Plugin significantly enhances moderation capabilities, it is essential to review and understand the implications of automated moderation. Always ensure transparency with your community regarding the use of AI in moderation processes.

**Privacy Note:** This plugin processes user-generated content to enforce moderation rules. Ensure compliance with your privacy policies and inform users about data processing practices.

* * *

---

_[View the full topic](https://meta.discourse.org/t/moderation-api-plugin/348828)._
