---
name: content-moderation-api
description: Content moderation API integration using OpenAI Moderation, Perspective API, and others
allowed-tools:
  - Read
  - Write
  - Edit
  - Bash
  - Glob
  - Grep
graph:
  domains: [domain:software-engineering]
  specializations: [specialization:ai-agents-conversational]
  skillAreas: [skill-area:natural-language-processing, skill-area:safety-redteaming]
  roles: [role:ml-engineer, role:backend-engineer]
  workflows: [workflow:feature-development, workflow:ml-model-lifecycle]

---

# Content Moderation API Skill

## Capabilities

- Integrate OpenAI Moderation API
- Set up Perspective API for toxicity detection
- Configure moderation thresholds
- Implement content filtering pipelines
- Design moderation response handling
- Create moderation logging and reporting

## Target Processes

- content-moderation-safety
- system-prompt-guardrails

## Implementation Details

### Moderation APIs

1. **OpenAI Moderation**: Hate, violence, self-harm, sexual content
2. **Perspective API**: Toxicity, insult, profanity, threat
3. **Azure Content Safety**: Text and image moderation
4. **LlamaGuard**: Open-source safety classifier

### Configuration Options

- API credentials and endpoints
- Category thresholds
- Action policies (block, warn, flag)
- Logging configuration
- Fallback behavior

### Best Practices

- Set appropriate thresholds
- Handle edge cases gracefully
- Log moderation decisions
- Regular threshold review
- Multi-layer moderation

### Dependencies

- openai
- google-cloud-language (Perspective)
- azure-ai-contentsafety


---
Source attribution: a5c-ai
Original project: https://github.com/a5c-ai/babysitter
License: MIT
License information: https://opensource.org/license/mit
Original upstream instructions; downloaded from Mega AI Hub.

## Upstream license notice

MIT License

Copyright (c) 2026 Gabriel Moreira

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.



# Mega AI Hub resource metadata

Creator / publisher: a5c-ai
Original project: https://github.com/a5c-ai/babysitter
Attribution basis: Upstream repository explicitly recorded in package mirror path

Fields of work: Marketing, Customer Support
Roles: Content Marketer, Customer Experience, Growth Marketer, Marketing Analyst, Social Media Manager
Specialties: API
Tools: OpenAI API
Country applicability: Country not specified
Classification basis: Source catalog labels
Instruction SHA-256: 4159a5c0e6b0f808a4842c3f40c3768d278cddb5ff30e35b473ba9e3f579eaf0
