Skip to main content

Classification Endpoints

List of endpoints for classifying File, URL and Text


Classify File (image/pdf)#

POST https://api.levity.ai/v1/classifiers/{classifier_id}/classify/#

The POST /v1/classifiers/{classifier_id}/classify/ endpoint can accept a request with the following json properties in the body payload:

Body Payload#
  • file: Binary of the file (PDF, JPG or PNG) to be uploaded (form-data)
  • externalContext: Source UUID (v4)
Header Fields#
  • Authorization: "Bearer < token > "

Classify URL (image/pdf)#

POST https://api.levity.ai/v1/classifiers/{classifier_id}/classify/#

The POST /v1/classifiers/{classifier_id}/classify/ endpoint can accept a request with the following json properties in the body payload:

Body JSON Payload#
  • url: Image/PDF URL.
  • externalContext: Source UUID (v4).
Header Fields#
  • Authorization: "Bearer < token > "
  • Content-Type: "application/json"

Classify Text#

POST https://api.levity.ai/v1/classifiers/{classifier_id}/classify/#

The POST /v1/classifiers/{classifier_id}/classify/ endpoint can accept a request with the following json properties in the body payload:

Body Parameters#
  • text: Text to predict on.
  • externalContext: Source UUID (v4).
Header Fields#
  • Authorization: "Bearer < token > "
  • Content-Type: "application/json"