---
title: "Query metrics from a run"
method: GET
path: "/api/runs/metrics"
tags: ["Runs"]
---

# Query metrics from a run

`GET /api/runs/metrics`

## Request

- Base URL: `https://pluto-api.trainy.ai`
- URL: `https://pluto-api.trainy.ai/api/runs/metrics`
- Auth: HTTP bearer

Returns time-series metrics from ClickHouse. Supports filtering by metric name, group, and step range. Uses reservoir sampling to limit data points.

## Query parameters

- `runId` number, nullable: Numeric run ID
- `projectName` string, required: Project name
- `logName` string: Filter by metric name (e.g., train/loss)
- `logGroup` string: Filter by metric group (e.g., train)
- `limit` number: Maximum data points to return
- `stepMin` integer, nullable: Minimum step number (inclusive). Use with stepMax to query a specific range of steps.
- `stepMax` integer, nullable: Maximum step number (inclusive). Use with stepMin to query a specific range of steps.

## Response `200`

Metrics data

- QueryMetricsResponse
  - `metrics` object[], required
    - `logName` string, required
    - `logGroup` string, required
    - `time` string, required
    - `step` number, required
    - `value` number, required

---

[API](https://skmtc.dev/trainy/apis/mlop-api.md) - [All operations](https://skmtc.dev/trainy/apis/mlop-api/llms.txt) - [OpenAPI document](https://skmtc.dev/trainy/apis/mlop-api/revisions/5d2c0b0baecb?raw)
