---
title: "Start a training run"
method: POST
path: "/v1/workspaces/{workspace_id}/training-runs"
tags: ["Training"]
---

# Start a training run

`POST /v1/workspaces/{workspace_id}/training-runs`

Start training a custom style/LoRA from a reference set. Returns immediately with a run ID. Poll GET /workspaces/{workspace_id}/training-runs/{training_run_id} for progress. Creative Units are reserved at submission; call the estimate endpoint first to check cost.

## Path parameters

- `workspace_id` string, uuid, required — Id of the workspace that owns the resource.

## Headers

- `Idempotency-Key` string

## Request body

- StartTrainingRequest
  - `reference_set_id` string, uuid, required — The reference set (Style) to train a LoRA for.
  - `base_model_id` string, nullable — Base model to train. Omit to use the reference set's configured or workspace default model.
  - `training_framework` 'fal' | 'ai-toolkit', nullable — Training framework override. Omit for the server default.

## Response `202`

Successful Response

- StartTrainingResponse
  - `training_run_id` string, uuid, required — Unique identifier for this training run.
  - `state` 'in_progress' | 'terminal_success' | 'terminal_failure', required — Coarse state; in_progress right after submission.
  - `raw_status` string, required — Fine-grained run status (e.g. initializing).
  - `base_model_id` string, nullable — Base model the run trains with.
  - `created_at` string, date-time, required — Timestamp the run was created.
  - `poll_interval_seconds` integer, required — Suggested polling interval in seconds.

## Other responses

- `401` — Unauthenticated — missing or invalid Bearer token.
- `403` — Forbidden — insufficient permissions, or the access token lacks the scope the operation requires.
- `404` — Resource not found.
- `409` — The request with this `Idempotency-Key` is still running — retry after the number of seconds in `Retry-After`.
- `422` — Invalid input parameters, or an `Idempotency-Key` reused for a different request.
- `429` — Rate limited — retry after the number of seconds in `Retry-After`.
- `500` — Internal server error.

---

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