🔌
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.
- 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.
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.
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.
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 thecallback_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.
post
/authenticate
Authenticate with API Key to obtain an API token
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
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
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