Skip to main content

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

ParameterTypeDescription
model_idstringUnique identifier of the model

Query Parameters

ParameterTypeDefaultDescription
run_idstringSpecific training run ID. Defaults to the most recent run if omitted
metricstringFilter to a single metric name (e.g., accuracy, loss)
resolutioninteger50Number 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 resolution points using uniform interval sampling if the raw count exceeds resolution.
  • Returns HTTP 404 if the model or requested run ID is not found.
  • Alias path /training/metrics is 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
}