☑️Standard & Premium: Policy Classification endpoints
Product
Categories covered
How it works
1. Authenticate
2. Sending your first request
POST endpoint reference
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}"
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
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
/classify/policy/imageThis 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}"
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
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
/classify/policy/videoExample code
3. Get results back via the GET endpoint
GET endpoint reference
Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
job_idstring · uuid4Required
Responses
200
Successful Response
application/json
404
Not found
422
Validation Error
application/json
get
/classify/policy/image/{job_id}Authorizations
AuthorizationstringRequired
Bearer authentication header of the form Bearer <token>.
Path parameters
job_idstring · uuid4Required
Responses
200
Successful Response
application/json
404
Not found
422
Validation Error
application/json
get
/classify/policy/video/{job_id}Example code
Example responses
4. Webhooks
Last updated
Was this helpful?
