---
title: "Gets the metrics for a model deployment"
method: GET
path: "/v1/models/{model_id}/deployments/{deployment_id}/metrics"
---

# Gets the metrics for a model deployment

`GET /v1/models/{model_id}/deployments/{deployment_id}/metrics`

Gets the metrics for a model deployment in the given time range.

## Query parameters

- `mode` 'CURRENT' | 'SUMMARY' | 'SERIES' — How metric values are aggregated over the request.
- `start_epoch_millis` integer, nullable
- `end_epoch_millis` integer, nullable
- `metrics` string[]

## Response `200`

- GetModelMetricsResponseV1 — Model metrics over a time window, index-mapped: metric descriptors appear once in ``metric_descriptors``; each value set's ``values`` are aligned to that order.
  - `start_epoch_millis` integer, required — Start of the returned window.
  - `end_epoch_millis` integer, required — End of the returned window.
  - `mode` 'CURRENT' | 'SUMMARY' | 'SERIES', required — How metric values are aggregated over the request.
  - `step_seconds` integer, nullable, required — Seconds per step; populated only in SERIES mode, null otherwise.
  - `metric_descriptors` ModelMetricDescriptorV1[], required — Descriptors for each metric; position defines the values index.
    - `name` string, required — Canonical metric name.
    - `unit_hint` 'PER_SECOND' | 'SECONDS' | 'BYTES' | 'MEBIBYTES' | 'COUNT' | 'RATIO', required — Advisory unit of a metric's values. Values are reported as scraped, so the hint describes the raw value (e.g. GPU memory is reported in mebibytes). - ``PER_SECOND``: a rate per second. - ``SECONDS``: a duration in seconds. - ``BYTES``: a size in bytes. - ``MEBIBYTES``: a size in mebibytes (MiB). - ``COUNT``: a dimensionless tally of discrete things. - ``RATIO``: a dimensionless ratio. Usually in ``[0, 1]`` but may exceed 1 (e.g. CPU usage in cores = cpu-seconds/second).
    - `kind` 'GAUGE' | 'COUNTER' | 'HISTOGRAM', required — Semantic hint for how a metric behaves, to aid client rendering and aggregation. It does not describe the value's shape (that is carried by the descriptor's ``label_sets``; a metric may break down into multiple series). - ``GAUGE``: an instantaneous value (e.g. queue size, running requests). - ``COUNTER``: a cumulative total over the step (e.g. tokens, restarts). - ``HISTOGRAM``: a distribution, exposed as quantile/average series.
    - `label_sets` object[], required — The metric's series, in order. Each entry is the set of labels identifying one series; the value at the same index in each value set's ``values`` is that series' value. A plain metric has a single entry with no labels (`{}`). A histogram has one entry per quantile plus an average, e.g. {'quantile': '0.5'} … {'quantile': '0.99'}, {'stat': 'avg'}. A by-status metric has one entry per status, e.g. {'status': '2xx'}.
  - `metric_values` ModelMetricValueSetV1[], required — Metric values per time step covering the window. In summary mode this always contains exactly one value set spanning the whole window.
    - `start_epoch_millis` integer, required — Start of the step. The step spans until the next value set's start, or the window end for the last one; a summary has a single value set starting at the window start.
    - `values` array[], required — Metric values aligned to the ``metric_descriptors`` index. Each entry is a list aligned to that descriptor's ``label_sets`` (a single-element list for a plain metric). A series with no data in this step is null.
      - number[]

---

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