Moderate

POST

Check whether a why_prompt complies with our content policy.

Parameters:

  • why_prompt: The prompt text to check for content policy compliance

Returns:

  • JSONResponse object with the following structure:
    • flagged: Boolean indicating whether the content was flagged
    • flagged_categories: List of categories that were flagged (empty if not flagged)

Example Response (flagged content):

1{
2 "flagged": true,
3 "flagged_categories": ["violence", "hate"]
4}

Example Response (non-flagged content):

1{
2 "flagged": false,
3 "flagged_categories": []
4}

Raises:

  • HTTPException 500: If an error occurs during the moderation check

Query parameters

why_promptstringRequired

Response

Successful Response