Models

The v1/models endpoint is used to make predictions using a trained model. Details on training a model via the API can be found at the Training endpoint. Use GET to obtain a list of all models. Then use the model ID to POST data to that model and receive predictions.

Get All Models

GET https://api.akkio.com/v1/models

Query Parameters

Name
Type
Description

api_key*

string

Your api key, accessible from https://app.akkio.com/team-settings

{
    "status": "success",
    "models": [
       
        {
            "id": "mpcfo01LuKwZKkH8fMwN",
            "name": "titanic-sheet-titanic"
        },
        {
            "id": "nPG4VV5MhXwiiuNdgYTU",
            "name": "Lead Scoring Demo"
    ]
}
# Example cURL

curl --request GET 'https://api.akkio.com/v1/models?api_key=api_key_string'

Make Prediction

POST https://api.akkio.com/v1/models

Request Body

Name
Type
Description

api_key*

string

Your api key, accessible from https://app.akkio.com/team-settings

data*

array

Data in the format of: [{'field name 1': 'value 1', 'field name 2': 0}, {...}, ...]

id*

string

The ID of the model to make the prediction with

{
    "status": "success",
    "predictions": [
        {
            "Survived": "0",
            "Probability Survived is 0": 0.8029362559318542,
            "Probability Survived is 1": 0.19706374406814575
        }
    ]
}
# Example cURL

curl -g --request POST 'https://api.akkio.com/v1/models?id=id_string&api_key=api_key_string&data=[{'\''field name 1'\'': '\''value 1'\'', '\''field name 2'\'': 0}]'

Delete Model

DELETE https://api.akkio.com/v1/models

Request Body

Name
Type
Description

id*

string

The ID of the model to be deleted

api_key*

string

Your api key, accessible from https://app.akkio.com/team-settings

{
    "status": "success"
}
# Example cURL

curl --request DELETE 'https://api.akkio.com/v1/models?id=id_string&api_key=api_key_string'

Last updated

Was this helpful?