# Model Training and Prediction

## Train Model

## Train model

<mark style="color:green;">`POST`</mark> `https://api.autogon.ai/api/v1/label/model/train/`

#### Request Body

| Name                                          | Type   | Description                                                                                                                    |
| --------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------ |
| model\_type<mark style="color:red;">\*</mark> | string | <p>String constant of model\_type.<br>Supported types:<br><code>'small'</code>, <code>'medium'</code>,<code>'large'</code></p> |
| project\_id<mark style="color:red;">\*</mark> | int    | Project ID                                                                                                                     |
| model\_load\_name                             | string | Name of model to be loaded for retraining. Leave as `null` to train a fresh model                                              |
| model\_save\_name                             | string | Name used to save the model to be trained                                                                                      |

{% tabs %}
{% tab title="201: Created Model metrics" %}

{% endtab %}
{% endtabs %}

## Make Predictions

## Predict annotations

<mark style="color:green;">`POST`</mark> `https://api.autogon.ai/api/v1/label/model/predict/`

#### Request Body

| Name                                          | Type   | Description                                   |
| --------------------------------------------- | ------ | --------------------------------------------- |
| app\_id<mark style="color:red;">\*</mark>     | int    | Project's app ID                              |
| image\_urls<mark style="color:red;">\*</mark> | array  | List of image urls for annotations prediction |
| confidence\_thresh                            | float  | Minimum confidence threshold to return        |
| overlap\_thresh                               | float  | Minimum boundiing box overlap threshold       |
| model\_name<mark style="color:red;">\*</mark> | string | Name of model to use for predicting           |

{% tabs %}
{% tab title="200: OK Annotations" %}

{% endtab %}
{% endtabs %}
