> For the complete documentation index, see [llms.txt](https://docs.akkio.com/akkio-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.akkio.com/akkio-docs/endpoints-and-schemas/endpoints/models.md).

# 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](/akkio-docs/endpoints-and-schemas/endpoints/training.md). 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

<mark style="color:blue;">`GET`</mark> `https://api.akkio.com/v1/models`

#### Query Parameters

| Name                                       | Type   | Description                                                         |
| ------------------------------------------ | ------ | ------------------------------------------------------------------- |
| api\_key<mark style="color:red;">\*</mark> | string | Your api key, accessible from <https://app.akkio.com/team-settings> |

{% tabs %}
{% tab title="200 " %}

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

{% endtab %}
{% endtabs %}

```bash
# Example cURL

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

## Make Prediction

<mark style="color:green;">`POST`</mark> `https://api.akkio.com/v1/models`

#### Request Body

| Name                                       | Type   | Description                                                                          |
| ------------------------------------------ | ------ | ------------------------------------------------------------------------------------ |
| api\_key<mark style="color:red;">\*</mark> | string | Your api key, accessible from <https://app.akkio.com/team-settings>                  |
| data<mark style="color:red;">\*</mark>     | array  | Data in the format of: \[{'field name 1': 'value 1', 'field name 2': 0}, {...}, ...] |
| id<mark style="color:red;">\*</mark>       | string | The ID of the model to make the prediction with                                      |

{% tabs %}
{% tab title="200  Example response  from request on the titanic dataset:
{ "id":"wNFRCKF4L2WRwl75lyja",
"data": \[{"Age":58}],
"api\_key": "YOUR\_API\_KEY" }" %}

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

{% endtab %}
{% endtabs %}

```bash
# 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&#x20;

<mark style="color:red;">`DELETE`</mark> `https://api.akkio.com/v1/models`

#### Request Body

| Name                                       | Type   | Description                                                         |
| ------------------------------------------ | ------ | ------------------------------------------------------------------- |
| id<mark style="color:red;">\*</mark>       | string | The ID of the model to be deleted                                   |
| api\_key<mark style="color:red;">\*</mark> | string | Your api key, accessible from <https://app.akkio.com/team-settings> |

{% tabs %}
{% tab title="200 " %}

```
{
    "status": "success"
}
```

{% endtab %}
{% endtabs %}

```bash
# Example cURL

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


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.akkio.com/akkio-docs/endpoints-and-schemas/endpoints/models.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
