---
title: "Train"
method: POST
path: "/api/ml/{id}/train"
tags: ["Machine Learning"]
---

# Train

`POST /api/ml/{id}/train`

After you add an ML backend, call this API with the ML backend ID to start training with 
        already-labeled tasks. 
        
        Get the ML backend ID by [listing the ML backends for a project](api:GET/api/ml/).

## Path parameters

- `id` integer, required

## Request body

- MLBackendTrainRequestRequest
  - `use_ground_truth` boolean — Whether to include ground truth annotations in training

## Response `200`

Training has successfully started.

## Other responses

- `500` — Training error

## Changes

> 97 revisions in range; 1 not diffed.

- **2026-08-07** `e1ba2ecdbabb` — 3 info
  - added the media type `application/x-www-form-urlencoded` to the request body
  - added the media type `multipart/form-data` to the request body
  - the `use_ground_truth` request property default value `false` was added

[Change history](https://skmtc.dev/humansignal/apis/label-studio-api/changes/api/ml/:id/train/post.md)

---

[API](https://skmtc.dev/humansignal/apis/label-studio-api.md) · [All operations](https://skmtc.dev/humansignal/apis/label-studio-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/humansignal/label-studio-api/revisions/b589624c66c3/schema)
