---
title: "Get Model Metrics"
method: POST
path: "/v1/analytics/model-metrics"
tags: ["analytics"]
---

# Get Model Metrics

`POST /v1/analytics/model-metrics`

## Request

- Base URL: `https://api.pioneer.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.pioneer.ai/v1/analytics/model-metrics`
- Auth: one of:
  - API key in header `X-API-Key`
  - HTTP bearer
- TypeScript: <https://skmtc.dev/pioneer/apis/brain-api/docs/v1/analytics/model-metrics/post.ts> (a function with typed inputs; its response is checked against the schema)

Return per-model metrics for the last 24 hours.

Counts, error counts, average latency, and last-inference timestamp are
all scoped to the last 24 hours. ``latest_evaluation`` is all-time.

Args:
    request: Batch of model ids to look up.
    auth: Authentication result carrying the user id and team scope.

Returns:
    ``ModelMetricsResponse`` with an entry for each requested id.

Raises:
    HTTPException: 503 when the metrics read fails; the cause is logged
        server-side rather than returned to the caller.

## Request body

- ModelMetricsRequest: Batch request body for model metrics lookup.
  - `model_ids` string[], required: Model identifiers to compute metrics for. Accepts training-job UUIDs and base catalog ids.
  - `since` string, date-time, nullable: Inclusive start of the rollup window (UTC). Defaults to 24 hours ago, preserving the legacy last-24h behaviour. Drives the page-level date picker on the models / routers surfaces.
  - `until` string, date-time, nullable: Exclusive end of the rollup window (UTC). Defaults to now.

## Response `200`

Successful Response

- ModelMetricsResponse: Batch response mapping input model id -> ModelMetrics. Every requested id is present in ``metrics``; ids with no matching inference rows in the last 24 hours map to a zero-filled ``ModelMetrics``.
  - `metrics` object

## Other responses

- `422`: Validation Error
- `503`: Model metrics dependency is temporarily unavailable.

## Changes

- **2026-09-24** `0e5e86e2bae5`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/pioneer/apis/brain-api/changes/v1/analytics/model-metrics/post.md)

---

[API](https://skmtc.dev/pioneer/apis/brain-api.md) - [All operations](https://skmtc.dev/pioneer/apis/brain-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pioneer/apis/brain-api/revisions/0e5e86e2bae5?raw)
