Get Training Metrics
Page Outline
Returns real-time or historical training metrics for a model's latest training run or a specific run, including loss curves and evaluation scores over epochs/iterations.
Base Path: /api/v1/models
Method: GET
Path: /{model_id}/training-metrics
Alias: /{model_id}/training/metrics
Auth: Requires a valid Bearer token (Authorization: Bearer <JWT>)
Path Parameters
| Parameter | Type | Description |
|---|---|---|
model_id | string | Unique identifier of the model |
Query Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
run_id | string | — | Specific training run ID. Defaults to the most recent run if omitted |
metric | string | — | Filter to a single metric name (e.g., accuracy, loss) |
resolution | integer | 50 | Number of data points to return for time-series metrics (downsampled if run has more) |
Behavior
- When a training run is actively in progress, returns live metrics up to the most recent epoch/iteration.
- Metrics are downsampled to
resolutionpoints using uniform interval sampling if the raw count exceedsresolution. - Returns
HTTP 404if the model or requested run ID is not found. - Alias path
/training/metricsis fully supported and returns identical data.
Response
Returns a TrainingMetrics object.
{
"model_id": "mdl-7f3a19bc",
"run_id": "run-20260313-a4b9c2",
"status": "completed",
"metrics": {
"accuracy": [0.72, 0.81, 0.88, 0.91, 0.934],
"loss": [0.65, 0.48, 0.33, 0.22, 0.14],
"val_accuracy": [0.70, 0.79, 0.86, 0.90, 0.928],
"val_loss": [0.68, 0.51, 0.37, 0.25, 0.17]
},
"epochs_completed": 5,
"total_epochs": 5
}