# 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 %}


---

# Agent Instructions: Querying This Documentation

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

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.autogon.ai/labelcraft/model-training-and-prediction.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
