v1

latestOpenAPI 3.0.0GNU General Public License v3.02026-07-1722535.6 KB

This endpoint trains a new ML Model.

Starts training a new Machine Learning model.

post/api/projects/{projectName}/models

Path parameters

projectNamestring required

The name of the project

Request body

querystring

The SQL CREATE MODEL statement used to train this model. See the CREATE MODEL statement

Response

Model training started

namestring
accuracynumber

Accuracy of trained model between 0 and 1

activeboolean

Whether or not this model is currenty the active version

versionnumber

Version of this model

statusstring

Current status of this model (generating | creating | complete | error)

predictstring

Column name that this model predicts

mindsdb_versionstring

MindsDB version associated with this model

errorstring

Error encountered during training, if applicable

fetch_data_querystring

SQL query used to fetch training data for this model

created_atstring

Time model was created at in YYYY-MM-DD HH:MM:SS format (trained models only)

training_timestring

How long training this model took in HH:MM:SS format (trained models only)

updatestring

Set to "available" when a new version of MindsDB is available that makes the model obsolete, or when new data is available in the data that was used to train the model (trained models only).