Unitary AI Policy Classification API
The Policy Classification API from Unitary AI — 6 operation(s) for policy classification.
The Policy Classification API from Unitary AI — 6 operation(s) for policy classification.
Every API here is available over the APIs.io API and to AI agents over MCP.
One button, every client — Claude, Cursor, VS Code and the rest.
https://apis.io/mcp
find_apisBrowse and filter every API in the catalog.get_api_artifactsOne API's artifacts, grouped by type.get_openapiThe primary OpenAPI for this API.find_similar_apisAPIs that look like this one.apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.resolveTurn a domain, URL or GitHub org into the provider it belongs to.find_cohortsEvery scored population of providers in the catalog.curl "https://apis.io/api/v1/apis/unitary-ai-policy-classification-api"
curl "https://apis.io/api/v1/apis?limit=25"
Discovery needs no key. Ratings and market analysis are Pro.
Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.
A second provider on the same verified email joins the account you already have.
openapi: 3.2.0
info:
title: Unitary content classification Policy Classification API
description: This API is for classifying image and video files to detect various types of potentially harmful content.
version: 1.0.0
tags:
- name: Policy Classification
paths:
/classify/policy/image/now:
post:
tags:
- Policy Classification
summary: Submit an image for immediate Policy classification
description: '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}"
```'
operationId: image_classify_policy_now_classify_policy_image_now_post
requestBody:
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Body_image_classify_policy_now_classify_policy_image_now_post'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/PolicyClassificationResponse'
'404':
description: Not found
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- JWTBearer: []
/classify/policy/image:
post:
tags:
- Policy Classification
summary: Queue an image for Policy classification
description: '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}"
```'
operationId: image_policy_classify_classify_policy_image_post
requestBody:
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Body_image_policy_classify_classify_policy_image_post'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/JobIDResponse'
'404':
description: Not found
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- JWTBearer: []
/classify/policy/image/{job_id}:
get:
tags:
- Policy Classification
summary: Retrieve the results of a queued Policy classification job
operationId: image_policy_classification_results_classify_policy_image__job_id__get
parameters:
- required: true
schema:
type: string
format: uuid4
title: Job Id
name: job_id
in: path
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AsyncResponse_PolicyClassificationResponse_'
'404':
description: Not found
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- JWTBearer: []
/classify/policy/video/now:
post:
tags:
- Policy Classification
summary: Submit a video for immediate Policy classification
description: '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/now" --header "Authorization: Bearer {API_TOKEN}" --header "Content-Type: multipart/form-data" --form "url={RESOURCE_URL}"
```'
operationId: video_classify_policy_now_classify_policy_video_now_post
requestBody:
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Body_video_classify_policy_now_classify_policy_video_now_post'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/VideoPolicyClassificationResponse'
'404':
description: Not found
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- JWTBearer: []
/classify/policy/video:
post:
tags:
- Policy Classification
summary: Queue a video for Policy classification
description: '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}"
```'
operationId: video_policy_classify_classify_policy_video_post
requestBody:
content:
application/x-www-form-urlencoded:
schema:
$ref: '#/components/schemas/Body_video_policy_classify_classify_policy_video_post'
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/JobIDResponse'
'404':
description: Not found
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- JWTBearer: []
/classify/policy/video/{job_id}:
get:
tags:
- Policy Classification
summary: Retrieve the results of a queued Policy classification job
operationId: video_policy_classification_results_classify_policy_video__job_id__get
parameters:
- required: true
schema:
type: string
format: uuid4
title: Job Id
name: job_id
in: path
responses:
'200':
description: Successful Response
content:
application/json:
schema:
$ref: '#/components/schemas/AsyncResponse_VideoPolicyClassificationResponse_'
'404':
description: Not found
'422':
description: Validation Error
content:
application/json:
schema:
$ref: '#/components/schemas/HTTPValidationError'
security:
- JWTBearer: []
components:
schemas:
PolicyCategoryFull:
properties:
name:
type: string
title: Policy category name
description:
type: string
title: Policy category description
risk_level:
type: string
title: Policy risk level
score:
type: number
title: Policy classification score
type: object
required:
- name
- description
- risk_level
title: PolicyCategoryFull
example:
name: ARMS_AMMO
description: Arms & Ammunition
risk_level: high
score: 0.8
Body_video_classify_policy_now_classify_policy_video_now_post:
properties:
callback_url:
type: string
maxLength: 2083
minLength: 1
format: uri
title: Webhooks callback URL
caption:
type: string
title: Caption
url:
type: string
maxLength: 65536
minLength: 1
format: uri
title: Url
type: object
title: Body_video_classify_policy_now_classify_policy_video_now_post
Body_image_policy_classify_classify_policy_image_post:
properties:
callback_url:
type: string
maxLength: 2083
minLength: 1
format: uri
title: Webhooks callback URL
caption:
type: string
title: Caption
url:
type: string
maxLength: 65536
minLength: 1
format: uri
title: Url
type: object
title: Body_image_policy_classify_classify_policy_image_post
AsyncResponseStatus:
enum:
- done
- failed
- queued
title: AsyncResponseStatus
description: An enumeration.
Body_image_classify_policy_now_classify_policy_image_now_post:
properties:
callback_url:
type: string
maxLength: 2083
minLength: 1
format: uri
title: Webhooks callback URL
caption:
type: string
title: Caption
url:
type: string
maxLength: 65536
minLength: 1
format: uri
title: Url
type: object
title: Body_image_classify_policy_now_classify_policy_image_now_post
PolicyClassificationResponse:
properties:
url:
type: string
maxLength: 65536
minLength: 1
format: uri
title: Url
policy_categories:
anyOf:
- items:
$ref: '#/components/schemas/PolicyCategoryFull'
type: array
- items:
$ref: '#/components/schemas/PolicyCategoryRiskLevels'
type: array
- items:
$ref: '#/components/schemas/PolicyCategoryScores'
type: array
title: Policy Categories
type: object
required:
- policy_categories
title: PolicyClassificationResponse
PolicyCategoryRiskLevels:
properties:
name:
type: string
title: Policy category name
description:
type: string
title: Policy category description
risk_level:
type: string
title: Policy risk level
type: object
required:
- name
- description
- risk_level
title: PolicyCategoryRiskLevels
description: "Possible categories names are:\n\n- ADULT_CONTENT: Adult & Explicit Sexual Content\n- ARMS_AMMO: Arms & Ammunition\n- CRIME_HARMFUL_ACTS: Crime & Harmful acts to individuals and Society,\n Human Right Violations\n- DEATH_INJURY_MILITARY: Death, Injury or Military Conflict\n- DEBATED_SENSITIVE: Debated Sensitive Social Issue\n- DRUGS_TOBACCO_ALCOHOL: Illegal Drugs/Tobacco/e-Cigarettes/Vaping/Alcohol\n- HATE_SPEECH_AGGRESSION: Hate speech & acts of aggression\n- OBSCENITY_PROFANITY: Obscenity and Profanity, including language,\n gestures, and explicitly gory, graphic or repulsive\n content intended to shock and disgust\n- PIRACY: Online piracy\n- SPAM: Spam or Harmful Content\n- TERRORISM: Terrorism\n\nFor each detected category the risk may be:\n\n- high\n- medium\n- low"
example:
name: ARMS_AMMO
description: Arms & Ammunition
risk_level: high
ValidationError:
properties:
loc:
items:
anyOf:
- type: string
- type: integer
type: array
title: Location
msg:
type: string
title: Message
type:
type: string
title: Error Type
type: object
required:
- loc
- msg
- type
title: ValidationError
VideoMetadata:
properties:
width:
type: integer
exclusiveMinimum: 0.0
title: Video width (pixels)
height:
type: integer
exclusiveMinimum: 0.0
title: Video height (pixels)
fps:
type: number
exclusiveMinimum: 0.0
title: Video average framerate
duration:
type: number
exclusiveMinimum: 0.0
title: Video duration (seconds)
seconds_processed:
type: number
minimum: 0.0
title: Number of seconds processed
description: The number of seconds of video processed to obtain results
type: object
required:
- width
- height
- fps
- duration
- seconds_processed
title: VideoMetadata
VideoPolicyClassificationResponse:
properties:
url:
type: string
maxLength: 65536
minLength: 1
format: uri
title: Url
policy_categories:
anyOf:
- items:
$ref: '#/components/schemas/PolicyCategoryFull'
type: array
- items:
$ref: '#/components/schemas/PolicyCategoryRiskLevels'
type: array
- items:
$ref: '#/components/schemas/PolicyCategoryScores'
type: array
title: Policy Categories
metadata:
$ref: '#/components/schemas/VideoMetadata'
type: object
required:
- policy_categories
title: VideoPolicyClassificationResponse
HTTPValidationError:
properties:
detail:
items:
$ref: '#/components/schemas/ValidationError'
type: array
title: Detail
type: object
title: HTTPValidationError
AsyncResponse_VideoPolicyClassificationResponse_:
properties:
status:
allOf:
- $ref: '#/components/schemas/AsyncResponseStatus'
title: Status of classification job
results:
allOf:
- $ref: '#/components/schemas/VideoPolicyClassificationResponse'
title: Classification results
msg:
type: string
title: Error details
type: object
required:
- status
title: AsyncResponse[VideoPolicyClassificationResponse]
PolicyCategoryScores:
properties:
name:
type: string
title: Policy category name
description:
type: string
title: Policy category description
score:
type: number
title: Policy classification score
type: object
required:
- name
- description
title: PolicyCategoryScores
example:
name: ARMS_AMMO
description: Arms & Ammunition
score: 0.8
JobIDResponse:
properties:
job_id:
type: string
format: uuid4
title: Job Id
type: object
required:
- job_id
title: JobIDResponse
AsyncResponse_PolicyClassificationResponse_:
properties:
status:
allOf:
- $ref: '#/components/schemas/AsyncResponseStatus'
title: Status of classification job
results:
allOf:
- $ref: '#/components/schemas/PolicyClassificationResponse'
title: Classification results
msg:
type: string
title: Error details
type: object
required:
- status
title: AsyncResponse[PolicyClassificationResponse]
Body_video_policy_classify_classify_policy_video_post:
properties:
callback_url:
type: string
maxLength: 2083
minLength: 1
format: uri
title: Webhooks callback URL
caption:
type: string
title: Caption
url:
type: string
maxLength: 65536
minLength: 1
format: uri
title: Url
type: object
title: Body_video_policy_classify_classify_policy_video_post
securitySchemes:
JWTBearer:
type: http
scheme: bearer
bearerFormat: JWT