☑️Standard & Premium: Policy Classification endpoints
Last updated
Last updated
The Policy Classification endpoints will serve you two products: Unitary Standard and Unitary Premium. The table below shows more details for each:
Product | Categories covered | How it works |
---|---|---|
For both the Standard and Premium products, Unitary will return in the classification results a raw score that you can use to set thresholds and determine if data is safe, harmful or ambiguous.
Please read How to select thresholdsif you need help analysing the Standard scores. We'll give you custom thresholds for any premium category we fine-tune to your policy or data.
You can contact support@unitary.ai if you wish to explore Unitary's Premium offering.
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.
Depending on your use case, pick an image or a video and then use one of the following POST
endpoints to send your first request.
Using the GET endpoint may be inadequate for large scale! The recommendation is using the "callback_url
" parameter instead. Please check the Integrating Webhooks guide for more information.
Depending on the processing status of the job at the time of request, you can get any of the following as the response from the GET endpoints:
(optional but encouraged)
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
Standard
• Adult & Sexual. Explicit sexual activity, nudity, detailed explanations of sexual encounters…
• Non-medical Drugs. Pills, coke, marihuana, minors drinking or smoking, paraphernalia…
• Violence and Injury. People killing or sexually assaulting other people, violent fights in uncontrolled settings, animal abuse, physical threats, suicide, self-injury or eating disorders and their glorification, graphic injuries...
• Weapons and Firearms. Firearms, ammunition, explosives, non-kitchen knives or homemade weapons in dangerous settings, instructional content on weapons…
• Hate Speech and Hate Symbols. Symbols from hate organisations, discrimination of people based on their identity…
The Standard product works "off the shelf". It does not require any input from your side. Please let us know if you need help analysing Untiary's model responses to set up decision thresholds.
To see improved performance over time, you can also get in contact to share false negatives and positives and make Unitary's models better for your use case.
Premium
All Standard categories tweaked based on your content guidelines + any other categories you may need e.g. cosmetic products.
The Premium product will give you greater accuracy by understanding your content guidelines and getting fine-tuned with your data. You can benefit from Unitary's Premium offering category by category. Please get in contact if you are interested in this.
This endpoint predicts the policy categories of a single image.
The request must contain a url
form field (a string containing a URL to download the image file from).
Example CURL:
curl --location --request POST "https://api.unitary.ai/v1/classify/policy/image" --header "Authorization: Bearer {API_TOKEN}" --header "Content-Type: multipart/form-data" --form "url={RESOURCE_URL}"
Successful Response
This endpoint predicts the policy categories of a single video.
The request must contain a url
form field (a string containing a URL to download the video file from).
Example CURL:
curl --location --request POST "https://api.unitary.ai/v1/classify/policy/video" --header "Authorization: Bearer {API_TOKEN}" --header "Content-Type: multipart/form-data" --form "url={RESOURCE_URL}"
Successful Response
Successful Response
Successful Response