LogoLogo
Why Unitary?
  • Get started
    • 馃憢Step-by-step instructions
  • API References
    • 鈩癸笍Features and requirements
    • 鈻讹笍API Authentication
    • 鈽戯笍Standard & Premium: Policy Classification endpoints
      • 馃攦Add-on: synchronous endpoints
    • 馃泜Virtual Moderator endpoint
    • #锔忊儯Items and Characteristics endpoints
      • *锔忊儯List of Item and Characteristics
    • 鈴猴笍Detoxify endpoints
    • 鈫旓笍How to select thresholds
    • 鈫笍Integrating Webhooks
Powered by GitBook
On this page

Was this helpful?

  1. API References
  2. Standard & Premium: Policy Classification endpoints

Add-on: synchronous endpoints

PreviousStandard & Premium: Policy Classification endpointsNextVirtual Moderator endpoint

Last updated 11 months ago

Was this helpful?

We offer an add-on for Unitary Premium that allows access to synchronous API endpoints. When you send a request to one of these endpoints, the Policy classification results will be returned in the API response. Therefore, these endpoints do not require the integration of webhooks.

Please get in contact () to discuss pricing if you are interested.

POST endpoint reference

鈽戯笍
馃攦
support@unitary.ai
  • POST endpoint reference
  • POSTSubmit an image for immediate Policy classification

Submit an image for immediate Policy classification

post

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/now" --header "Authorization: Bearer {API_TOKEN}" --header "Content-Type: multipart/form-data" --form "url={RESOURCE_URL}"
Authorizations
Body
callback_urlstring 路 uri 路 min: 1 路 max: 2083Optional
captionstringOptional
urlstring 路 uri 路 min: 1 路 max: 65536Optional
Responses
200
Successful Response
application/json
404
Not found
422
Validation Error
application/json
post
POST /classify/policy/image/now HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/x-www-form-urlencoded
Accept: */*
Content-Length: 83

"callback_url='https://example.com'&caption='text'&url='https://example.com'"
{
  "url": "https://example.com",
  "policy_categories": [
    {
      "name": "ARMS_AMMO",
      "description": "Arms & Ammunition",
      "risk_level": "high",
      "score": 0.8
    }
  ]
}