Search
K
Links
🔌

API Integration

Connect to Unitary services to get your content automatically reviewed
This API is for classifying image and video files to detect various types of potentially harmful content.

Before you start

  • You will need an API Key to access this API. Please email [email protected] to obtain one.
  • If using the webhooks function then a preshared secret will also be required.

API Authentication

All API requests (except to /authenticate) require a valid API token in the Authorization header. To obtain an API token you should POST to /authenticate with your API Key.
API Tokens will be valid for a limited period of time (default 24h) and should be re-used until they expire or are invalidated. Please note that the /authenticate endpoint is rate-limited and excessive requests will return errors.

Submitting media for classification

Unitary's API accepts files for the image/video endpoints and free text on the Detoxify endpoint (read more about Detoxify on Detoxify). The files or texts are submitted to the aforementioned endpoints for asynchronous classification returning a job_id associated with each request.
Media files can either be sent as multi-part form uploads, or preferably by including a url field in the request where the media file can be downloaded from. Presigned object-storage URLs are supported.
The maximum allowed image size is 10MB The maximum allowed video size is 200MB
Requests made with media files larger than the limits specified may not be processed.

Receiving classification results

For receiving results we support multiple methods:
  • The preferred method is to utilise the webhook function by including a callback_url parameter in the classification request. Results will be delivered by a POST request to the callback_url as soon as the resource is classified.
  • Results can also be retrieved by polling the GET endpoints. This method may be inconvenient as processing can take multiple hours.

API Authentication

post
/authenticate
Authenticate with API Key to obtain an API token

GARM

post
/garm/video
Queue a video for GARM classification
get
/garm/video/{job_id}
Retrieve the results of a queued GARM classification
post
/garm/image
Queue an image for GARM classification
get
/garm/image/{job_id}
Retrieve the results of a previously queued job

ITEMS_CHARACTERISTICS

post
/items_characteristics/video
Queue a video for Items & Characteristics classification
get
/items_characteristics/video/{job_id}
Retrieve the results of a queued Items & Characteristics classification
post
/items_characteristics/image
Queue an image for Items & Characteristics classification
get
/items_characteristics/image/{job_id}
Retrieve the results of a queued Items & Characteristics classification

Detoxify

post
/detoxify/text/
Queue text for Detoxify classification
get
/detoxify/text/{job_id}
Retrieve the results of a queued Detoxify classification
Last modified 1mo ago
Copyright © Unitary Ltd