---
title: "Stats Group Runs"
method: POST
path: "/api/v1/runs/group/stats"
tags: ["run"]
---

# Stats Group Runs

`POST /api/v1/runs/group/stats`

Get stats for the grouped runs.

## Request body

- RunGroupRequest
  - `session_id` string, uuid, required
  - `group_by` 'conversation', required
  - `filter` string, nullable
  - `start_time` string, date-time, nullable
  - `end_time` string, date-time, nullable
  - `offset` integer
  - `limit` integer

## Response `200`

Successful Response

- RunGroupStats
  - `run_count` integer, nullable
  - `latency_p50` number, nullable
  - `latency_p99` number, nullable
  - `first_token_p50` number, nullable
  - `first_token_p99` number, nullable
  - `total_tokens` integer, nullable
  - `prompt_tokens` integer, nullable
  - `completion_tokens` integer, nullable
  - `median_tokens` integer, nullable
  - `completion_tokens_p50` integer, nullable
  - `prompt_tokens_p50` integer, nullable
  - `tokens_p99` integer, nullable
  - `completion_tokens_p99` integer, nullable
  - `prompt_tokens_p99` integer, nullable
  - `last_run_start_time` string, date-time, nullable
  - `feedback_stats` object, nullable
  - `run_facets` object[], nullable
  - `error_rate` number, nullable
  - `streaming_rate` number, nullable
  - `total_cost` number, nullable
  - `prompt_cost` number, nullable
  - `completion_cost` number, nullable
  - `cost_p50` number, nullable
  - `cost_p99` number, nullable
  - `prompt_token_details` object, nullable
  - `completion_token_details` object, nullable
  - `prompt_cost_details` object, nullable
  - `completion_cost_details` object, nullable
  - `group_count` integer, required

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/langchain-ai/apis/langsmith.md) · [All operations](https://skmtc.net/langchain-ai/apis/langsmith/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/langchain-ai/langsmith/versions/a0acb3a6a101/schema)
