Skip to main content

NLP Direct API

tip
You can use your trained classifier in external applications via the NLP Direct API.

You can also use a trained Tovie NLP classifier in your Tovie Platform projects via the $caila service.

API methods

API provides methods for:

  • Project management: export and import projects.
  • Classification: basic classification, classification of text with additional parameters.
  • Entity management: find entities in the argument text, edit entities.
  • Model re-training: re-train the model based on changes.
caution
Please note: if model re-training fails, the previous version is used for classification.

Working with the API

Let’s consider working with the API by an example of a method:

https://<host_name>/cailapub/api/caila/p/{accessToken}/export
  • host_name you can copy from the address line.

For example, for https://platform.tovie.ai/ the method will look like this:

https://platform.tovie.ai//cailapub/api/caila/p/{accessToken}/export
  • accessToken — NLP Direct API key, which is used for access control.

To get the key, go to editing the Tovie Platform project. Select the Classifier tab > press Generate in the NLP Direct API key field > copy the value.

To get the API key of the current project from a bot script, use the method:

$jsapi.cailaService.getCurrentClassifierToken()