Skip to content

Get a training run

Viewing v2— current version

GET
/v2/workspaces/{workspace_id}/training-runs/{training_run_id}
curl --request GET \
--url https://api.app.layer.ai/api/v2/workspaces/:workspace_id/training-runs/:training_run_id \
--header 'Authorization: Bearer <token>'

Unchanged from v1. This endpoint’s documented request and response schemas are identical in v1 and v2 — change the /v1 prefix to /v2. Schema equality is not a promise about behaviour, so keep your usual smoke tests.

Get the status and progress of a training run.

workspace_id
required
Workspace Id

Id of the workspace that owns the resource.

string format: uuid

Id of the workspace that owns the resource.

training_run_id
required
Training Run Id

Id of the training run.

string format: uuid

Id of the training run.

Successful Response

Media typeapplication/json
GetTrainingRunResponse
object
training_run_id
required
Training Run Id
string format: uuid
state
required
State

In_progress, terminal_success, or terminal_failure.

string
Allowed values: in_progress terminal_success terminal_failure
raw_status
required
Raw Status

Fine-grained run status.

string
progress
required
Progress

Training progress in [0, 1]; 1.0 when complete.

number
poll_interval_seconds
Any of:
integer
eta_at
Any of:
string format: date-time
started_at
Any of:
string format: date-time
finished_at
Any of:
string format: date-time
error
Any of:
string
error_code
Any of:
string
Example
{
"state": "in_progress"
}

Unauthenticated — missing or invalid Bearer token.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description."
}

Forbidden — insufficient permissions.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description."
}

Resource not found.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description."
}

Invalid input parameters.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description."
}

Rate limited — too many concurrent requests.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description."
}

Internal server error.

Media typeapplication/problem+json
object
type
required
string
title
required
string
status
required
integer
detail
required
string
Example
{
"type": "https://api.layer.ai/errors/ERROR_CODE",
"title": "Error Title",
"status": 400,
"detail": "Human-readable description."
}