---
title: "Get Project KPI Cards"
method: POST
path: "/v1/private/projects/{id}/kpi-cards"
tags: ["Projects"]
---

# Get Project KPI Cards

`POST /v1/private/projects/{id}/kpi-cards`

Gets KPI card metrics for a project

## Path parameters

- `id` string, uuid, required

## Request body

- KpiCardRequest
  - `entity_type` 'traces' | 'spans' | 'threads', required
  - `filters` string
  - `interval_start` string, date-time, required
  - `interval_end` string, date-time

## Response `200`

KPI Card Metrics

- KpiCardResponse
  - `stats` KpiMetric[]
    - `type` 'count' | 'errors' | 'avg_duration' | 'total_cost'
    - `current_value` number, double — Metric value for the current period. Unit depends on `type`: `count` is an integer count; `errors` is a percentage in [0, 100]; `avg_duration` is milliseconds; `total_cost` is in USD.
    - `previous_value` number, double — Metric value for the immediately preceding period of equal length. Same unit as `current_value`.

## Other responses

- `400` — Bad Request

---

[API](https://skmtc.net/comet-ml/apis/opik-rest-api.md) · [All operations](https://skmtc.net/comet-ml/apis/opik-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/comet-ml/opik-rest-api/versions/4ed2fbc97cc3/schema)
