Moderation

Moderation

The Moderation endpoint checks text for harmful or inappropriate content, returning flags for categories like hate or violence. Example:

python
from openai import OpenAI client = OpenAI(    base_url="https://api.livrouter.com/v1") response = client.moderations.create(input="This is a safe sentence.")print(response.results[0].flagged)