# Text Moderation API

> Context-aware content moderation API that flags toxic, hate, harassment, and 7 more categories of harmful text, and pinpoints the matched content.

The Copyleaks Text Moderation API is a content moderation API that identifies harmful [text](https://copyleaks.com/text-moderation) while understanding context, so you can protect your community without over-filtering legitimate conversations. It flags content across 10 categories and pinpoints exactly which words or sentences triggered each flag.

![Text Moderation API](/assets/mainpage/textModeration_ContextualAwareness.webp)

## Why Content Moderation Matters

User-generated content is the heart of online communities, but with millions of posts, comments, and messages, keeping things safe and positive can feel overwhelming:

- **Protect Your Reputation**: One harmful post can damage years of building trust with your audience
- **Legal Protection**: Platforms can face liability for hosting certain types of harmful content
- **User Safety**: Your community deserves protection from harassment, hate speech, and toxic behavior
- **Scale Challenge**: Manual moderation doesn't work when you're handling thousands of posts every day
- **Consistency Issues**: Human moderators might handle similar content differently, creating unfair experiences
- **Cost Control**: Hiring enough human moderators to handle large volumes gets expensive fast

Traditional content filters miss nuance and context, leading to false positives that frustrate users and false negatives that let harmful content slip through. You need moderation that actually understands what people are saying.

## Core Capabilities

<CardGroup cols={2}>
    <Card title="Find Harmful Content Accurately" icon="shield-halved">
      Our context-aware AI understands when language is actually harmful versus just colorful, reducing false positives that can frustrate human moderators.
    </Card>
    <Card title="See Where Issues Are" icon="location-crosshairs">
      Pinpoint exactly which words or sentences triggered the flag, so you can review efficiently and take targeted action.
    </Card>
    <Card title="Choose Your Focus" icon="list-check">
      Pick which types of content to monitor from 10 categories - toxic content, profanity, hate speech, harassment, violence, self-harm, drug usage, firearms, and more - based on your community's needs.
    </Card>
    <Card title="Explain What's Wrong" icon="brain">
      Get clear explanations for why content was flagged, not just vague category labels. Make confident moderation decisions.
    </Card>
</CardGroup>

## Features

We're taking text understanding to a new level. Our moderation API doesn't just scan for keywords - it actually comprehends meaning and context to make smarter decisions about what's truly harmful.

### Context-Aware Detection

Unlike basic keyword filters, our AI understands when potentially sensitive language is being used appropriately versus when it's meant to harm.

- **Reduces False Positives**: Discussions about medical topics, news events, or educational content won't get wrongly flagged
- **Catches Subtle Harassment**: Identifies harmful intent even when no explicit words are used
- **Understands Nuance**: Recognizes the difference between reporting violence and promoting it
- **Protects Legitimate Content**: Academic papers, news articles, and educational content stay safe

### Varied Moderation Categories

Choose exactly what types of content you want to monitor. Our system identifies harmful content across 10 different categories:

- **Toxic Content**: Harmful language that insults, demeans, or degrades to cause emotional harm
- **Profanity**: Explicit language, profanity, or vulgar expressions
- **Hate Speech**: Content promoting hatred, discrimination, or prejudice against groups
- **Harassment**: Bullying, intimidation, or targeted harassment content
- **Self-Harm**: Content promoting self-injury, suicide, or other forms of self-harm
- **Adult Content**: Sexually explicit or suggestive material inappropriate for minors
- **Violence**: Content depicting, promoting, or threatening violence or dangerous activities
- **Drugs**: Content related to illegal drug use, drug trafficking, or substance abuse
- **Firearms**: Content related to weapons, firearms, or other dangerous implements
- **Cybersecurity**: Potential security threats, malicious content, or cyber attack material

[**Learn more**](/reference/data-types/moderation/text-moderation-labels)

![Text Moderation Categories](/assets/mainpage/textModeration_Categories-1.webp)

{/* ### Explain Why Content Was Flagged

Soon, Text Moderation will go beyond simple category labels to provide clear explanations for why content was flagged. Instead of only seeing "Violent" or "Hate Speech," you'll understand the exact context and reasoning behind each flag.

- **Clear Reasoning**: Understand why specific content triggered moderation
- **Context Explanations**: See how the AI interpreted meaning and intent
- **Better Decisions**: Make informed choices about what to allow or remove
- **Faster Review**: Spend less time analyzing flagged content */}

## Use Cases

<Tabs>
  <Tab title="User-Generated Content">
    Keep conversations healthy while preserving free expression. Perfect for comments sections, user posts, and direct messages to catch harassment and hate speech.
    
    [**Learn more**](/concepts/use-cases/user-generated-content-platforms)
  </Tab>
  <Tab title="Publishers">
    Screen articles, comments, and user submissions before publishing. Protect your brand reputation by catching harmful content early.
    
    [**Learn more**](/concepts/use-cases/publishers)
  </Tab>
</Tabs>

## Works Better Together

Our text moderation works great with our other tools to give you complete content protection.

<CardGroup cols={2}>
  <Card title="AI Detector" icon="robot" href="/concepts/products/ai-text-detection-api">Catch AI-generated fake reviews and comments alongside harmful content detection</Card>
  <Card title="Plagiarism Checker" icon="magnifying-glass" href="/concepts/products/plagiarism-checker-api">Find copied content and spam posts to keep your platform authentic and safe</Card>
</CardGroup>

![Text Moderation with Plagiarism and AI Detection](/assets/mainpage/textModeration_with_productSuite.webp)

## Next Steps

Ready to protect your platform with intelligent text moderation?

<CardGroup cols={2}>
  <Card title="Start Building" icon="rocket" href="/guides/moderation/moderate-text">Follow our simple guide to add text moderation to your application</Card>
  <Card title="Try it" icon="flask" href="https://copyleaks.com/text-moderation">Test our moderation API with your content and see how it works</Card>
  <Card title="API Documentation" icon="code" href="/reference/actions/text-moderation/check">See all the technical details for our text moderation API</Card>
  <Card title="Content Categories" icon="tags" href="/reference/data-types/moderation/text-moderation-labels">Learn about all 10 moderation categories and their specific labels</Card>
</CardGroup>

## Frequently asked questions

### Is this a content moderation API?

Yes. The Text Moderation API moderates user-generated text - comments, posts, reviews, and messages - flagging harmful content across 10 categories so you can keep your platform safe at scale.

### Which categories of harmful content does it detect?

Ten categories: toxic content, profanity, hate speech, harassment, self-harm, adult content, violence, drugs, firearms, and cybersecurity. See the [moderation labels reference](/reference/data-types/moderation/text-moderation-labels) for the full definitions.

### How is it different from a keyword filter?

It is context-aware. Instead of matching keywords, it interprets meaning and intent, which reduces false positives on medical, news, and educational discussions while still catching subtle harassment that uses no explicit words.

### Does it tell me which part of the text was flagged?

Yes. The response pinpoints the specific words or sentences that triggered each flag, along with the category, so you can review and act efficiently.

### Which endpoint runs text moderation?

`POST https://api.copyleaks.com/.../text-moderation/check`. See the [text moderation API reference](/reference/actions/text-moderation/check) for the full request and response.

<Card title="Want to See it in Action?" icon="calendar-check" href="https://copyleaks.com/book-a-demo" cta="Book a Demo" arrow="true">
  Get a personalized demo and see how easy it is to add smart text moderation to your platform. We'll show you context-aware detection and help you pick the right categories for your needs
</Card>
