> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-docs-platform-docs-release.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Overview

> Use OpenAI moderation with CometChat to detect harmful messages, configure prompts, choose models, and apply moderation actions.

CometChat offers AI-powered message moderation to help maintain a safe and respectful chat environment. You can choose between two moderation options:

### **OpenAI Moderation**

Leverage OpenAI’s AI models to automatically detect and filter offensive, harmful, or inappropriate messages in real time. This option allows you to:

* **Define Custom Prompts** – Set specific prompts to classify and moderate messages based on your needs.
* **Choose an AI Model** – Select the OpenAI model that best suits your moderation requirements.
* **Contextual Moderation** – Configure how many previous messages from the conversation should be considered for better contextual understanding.
* **Flexible Moderation Actions** – Block, allow, or take fallback actions if the API request fails.
* **Secure API Management** – Provide and manage OpenAI credentials directly in the CometChat dashboard.

This moderation provide flexibility to enhance user safety and compliance within your chat platform.
