How to submit content for moderation and which content types you can analyze with Moderation API.
contentId
to associate the requests with a specific content. This will usually be the content’s unique identifier from your own database.
If you do not specify a contentId
, the API will generate a random ID for the content.
When including a contentId
Moderation API will know that submitting the same contentId
will be an update to the existing content. This is especially useful if you are using review queues and want to update the content in the review queue without adding a new item to the queue.
The contentId can also be used to excute actions in the reviiew queue programmatically. For example you can allow users to report content on your platform and then add it to a review queue.
contextId
in the request body.contextId
can also be used to filter the review queue to only show content from a specific context.
Enable context awareness to improve the accuracy of your moderation using the contextId.
authorId
in the request body. metadata
object in the request body. Context awareness
in your project settings, and then include authorId
and/or contextId
in the API request. This enables models to pull in previous messages for their analysis and increase their accuracy.
contextId
to see the previous messages in the same context, and authorId
to see the previous messages from the same author.
Specifically this can prevent unwanted content that are spread of multiple messages.
doNotStore
boolean in the request body. doNotStore
to true
, the content will not be stored and only pass through the moderation models. doNotStore
to true
, it will make parts of the moderation
dashboards less useful.