---
title: "POST /models/{modelId}/trainings"
method: POST
path: "/models/{modelId}/trainings"
---

# POST /models/{modelId}/trainings

`POST /models/{modelId}/trainings`

## Path parameters

- `modelId` string, required

## Headers

- `Content-Type` string, required

## Request body

- PostTrainings
  - `dataBundleIds` string[]
  - `description` string, nullable
  - `instanceType` 'small-gpu' | 'medium-gpu' | 'large-gpu', nullable
  - `metadata` object
  - `name` string, nullable

## Response `200`

200 response

- Training
  - `createdBy` string, nullable, required
  - `createdTime` string, nullable, required
  - `dataBundleIds` string[], required
  - `description` string, nullable, required
  - `gpuHours` integer, required
  - `instanceType` 'small-gpu' | 'medium-gpu' | 'large-gpu', required
  - `metadata` object, required
  - `modelId` string, required
  - `name` string, nullable, required
  - `status` 'waiting-for-approval' | 'pending' | 'running' | 'succeeded' | 'failed' | 'cancelled', required
  - `trainingId` string, required
  - `updatedBy` string, nullable, required
  - `updatedTime` string, nullable, required

## Other responses

- `400` — 400 response
- `403` — 403 response
- `404` — 404 response
- `415` — 415 response
- `500` — 500 response

## Changes

- **2022-03-16** `fc6ba1d5e844` — 1 info
  - added the required property `gpuHours` to the response with the `200` status
- **2022-02-04** `2261469a6890` — 2 info
  - added the new optional request property `metadata`
  - added the required property `metadata` to the response with the `200` status
- **2021-12-10** `c3dbcad72582` — 3 warning, 3 info
  - added the new `cancelled` enum value to the `status` response property for the response status `200`
  - added the new `running` enum value to the `status` response property for the response status `200`
  - added the new `succeeded` enum value to the `status` response property for the response status `200`
  - removed the `aborted` enum value from the `status` response property for the response status `200`
  - …2 more
- **2021-12-01** `40fd96cfeeab` — 1 info
  - endpoint added
- **2021-11-05** `9788e6bfa925` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/lucidtechai/apis/lucidtech-api/changes/models/:modelId/trainings/post.md)

---

[API](https://skmtc.dev/lucidtechai/apis/lucidtech-api.md) · [All operations](https://skmtc.dev/lucidtechai/apis/lucidtech-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/lucidtechai/lucidtech-api/revisions/13bf8cf663ba/schema)
