Caila REST API
Caila REST API is the API through which the Caila web interface operates. All functions available in the web interface are accessible via the REST API.
The Swagger specification is available.
Generated clients are available for Python and Java. They are located here: Python SDK and Java SDK.
To access the API, you’ll need to create an API token, which can be done in the corresponding section of the web interface. If you use the API to create a composite service, the token will be passed to the service through the MLP_CLIENT_TOKEN environment variable (for more details, see the Composite services section), and the server address through the MLP_REST_URL variable.
REST API features
- Calling Caila services: Predict API.
- Creating derivative services and launching training.
- Uploading and managing datasets.
- Creating and configuring services.
- Connecting dedicated servers and managing resource pools.
- Obtaining information about balance, costs, and revenue.
- And much more.
Call example
Let’s consider an example of accessing the vectorizer-caila-roberta service.
curl -X POST https://caila.io/api/mlpgate/account/just-ai/model/vectorizer-caila-roberta/predict \
-H “MLP-API-KEY: xxx” \
-H “Content-Type: application/json” \
-d ‘{"texts":["Hello"]}’
Expected response:
{"embedded_texts":[{"vector":[0.4766579270362854,-0.18601498007774353,0.23763521015644073,-0.5908674597740173,-0.22597207129001617,-0.13075418770313263,0.2103278487920761,-0.6492880582809448,-0.4092460870742798,-0.5639411211013794,0.12688767910003662,0.37768375873565674,0.3678416311740875,0.35923194885253906,0.005947093013674021]}]}