Models management
Endpoints to interact with your models. Since models are contained in projects, you will always need to indicate the project_id in which you want to operate.
List allowed objectives and libraries
GET
https://api.expai.io/api/models/get_allowed
Retrieves the current allowed prediction objectives (e.g. classification or prediction) and model formats (e.g. Pickle or Tensorflow) allowed in EXPAI.
Headers
Name | Type | Description |
---|---|---|
access-token | string | Active JWT token |
Content-Type | string | Value: "application/json" |
Models objective and prediction can be combined as follows:
Model objective | Model Prediction |
Regression | Regression |
Classification | Categorical (>2 classes) or Binary (2 classes) |
Create a Model
POST
https://api.expai.io/api/projects/<project_id>/model/create
Load a file to create a model in an EXPAI project. Indicate metadata for the correct execution on our platform.
Path Parameters
Name | Type | Description |
---|---|---|
project_id | string | Unique ID from the project where data must be stored |
Headers
Name | Type | Description |
---|---|---|
access-token | string | Active JWT token |
Request Body
Name | Type | Description |
---|---|---|
model_file | object | File containing the exported model |
model_name_des | string | Unique name for the model |
model_objective_des | string | Objective for the model. See previous endpoint for details. |
model_prediction_type_des | string | Prediction type. See previous endpoint for details. |
model_cutoff_num | string | For binary classifiers, you can indicate a custom decision boundary. Default for binary models is 0.5. |
model_summary_des | string | Description for the model. |
output_classes_des | string | If model is a classifier, indicate the name for the output classes. If classification outputs 0 for "No" and 1 for "Yes", introduce ["No", "Yes"] |
List all Models
GET
https://api.expai.io/api/projects/<project_id>/model/list
List all the models in your project
Path Parameters
Name | Type | Description |
---|---|---|
project_id | string | Unique ID from the project where you want to search |
Headers
Name | Type | Description |
---|---|---|
access-token | string | Active JWT token |
Content-Type | string | Value: "application/json" |
Search Models by name
GET
https://api.expai.io/api/projects/<project_id>/model/list/contains/<text>
List all models in your project containing a string in their names
Path Parameters
Name | Type | Description |
---|---|---|
project_id | string | Unique ID from the project where you want to search |
text | string | String to search Models by |
Headers
Name | Type | Description |
---|---|---|
access-token | string | Active JWT token |
Content-Type | string | Value: "application/json" |
Update Model
PATCH
https://api.expai.io/api/projects/<project_id>/model/<model_id>
Update some existing model in your project.
Path Parameters
Name | Type | Description |
---|---|---|
model_id | string | Unique ID from the model to be updated |
project_id | string | Unique ID from the project where data must be stored |
Headers
Name | Type | Description |
---|---|---|
access-token | string | Active JWT token |
Request Body
Name | Type | Description |
---|---|---|
model_file | object | File containing the new model |
model_name_des | string | Unique name for the model |
model_objective_des | string | Objective for the model. See previous endpoint for details. |
model_prediction_type_des | string | Prediction type. See previous endpoint for details. |
model_cutoff_num | string | For binary classifiers, you can indicate a custom decision boundary. Default for binary models is 0.5. |
model_summary_des | string | Description for the model. |
output_classes_des | string | If model is a classifier, indicate the name for the output classes. If classification outputs 0 for "No" and 1 for "Yes", introduce ["No", "Yes"] |
Delete Model
DELETE
https://api.expai.io/api/projects/<project_id>/model/<model_id>
Delete a Model in a Project
Path Parameters
Name | Type | Description |
---|---|---|
project_id | string | Unique ID for the project containing the sample |
model_id | string | Unique ID for the model to be deleted |
Headers
Name | Type | Description |
---|---|---|
access-token | string | Active JWT token |
List Model target classes
GET
https://api.expai.io/api/projects/<project_id>/model/<model_id>/get_target_classes
You can list the output classes for a model using this endpoint.
Path Parameters
Name | Type | Description |
---|---|---|
model_id | string | Model ID to list classes |
project_id | string | Unique ID for the project containing the sample |
Headers
Name | Type | Description |
---|---|---|
access_token | string | Valid access token |
Last updated