đVirtual Moderator endpoint
The Virtual Moderator endpoint provides an easy way to integrate with our Virtual Trust & Safety Agents. These agents leverage a blended solution of AI and humans for our most advanced understanding of content, giving you human-level accuracy quickly and reliably.
1. Authenticate
Please follow the API Authentication instructions first in order to authenticate with Unitary's API. This will generate a token that is valid for 24 hours and must be used in subsequent API requests.
2. AI Pre-filter request (optional)
Please refer to the documentation in Standard & Premium: Policy Classification endpoints for how to send an AI Pre-filter request. Make sure to keep the job_id
returned in the AI Pre-filter response which will be used as the classification_job_id
field in your Virtual Moderator request.
3. Sending your first request
Use the following POST
endpoint to send your first request to the Virtual Moderator endpoint.
4. Webhooks
In order to have a scalable end-to-end integration, the last step is to set up the receiving of webhooks as described in the following guide: Integrating Webhooks
Example successful response:
Note: This structure is also used for a detailed error response where the is_error
field will be true
and policy_categories
field will be empty. This type of error response occurs after fatal errors occur that are not retried, e.g. when unsupported file types are provided.
Generic error response after retries:
This basic error response may be returned after exceeding all API retries, e.g. unreachable human moderation platform. However, for this case our API usually recovers and sends back the AI moderation results, so this type of error response should rarely occur.
Last updated