---
title: "LLM request statistics"
method: GET
path: "/v1/default/banks/{bank_id}/llm-requests/stats"
tags: ["LLM Traces"]
---

# LLM request statistics

`GET /v1/default/banks/{bank_id}/llm-requests/stats`

## Request

- Base URL: `https://hindsight.vectorize.io` (the document declares no server; this is the origin it was published from)
- URL: `https://hindsight.vectorize.io/v1/default/banks/{bank_id}/llm-requests/stats`
- Auth: none declared
- TypeScript: <https://skmtc.dev/vectorize/apis/hindsight-http-api/docs/v1/default/banks/:bank_id/llm-requests/stats/get.ts> (a function with typed inputs; its response is checked against the schema)

Get LLM request counts grouped by time bucket and status for charting. Only requests within HINDSIGHT_API_LLM_TRACE_RETENTION_DAYS are kept, so a period longer than `retention_days` (in the response; null = kept forever) only covers the last `retention_days`.

## Path parameters

- `bank_id` string, required

## Query parameters

- `operation` string, nullable: Filter by operation
- `call_type` 'llm' | 'embedding' | 'rerank' | 'decision', nullable: Filter by kind of model call: llm, embedding, rerank or decision
- `period` string: Time period: 1d (by hour), 7d, or 30d (by day)
- `split_by` 'model' | 'operation', nullable: Also split each bucket by model or by operation (returned in `series`)

## Headers

- `authorization` string, nullable

## Response `200`

Successful Response

- LLMRequestStatsResponse: LLM request counts and token sums grouped by time bucket.
  - `bank_id` string, required
  - `period` string, required
  - `trunc` string, required
  - `start` string, required
  - `buckets` LLMRequestStatsBucket[], required
    - `time` string, required
    - `statuses` object, required
    - `total` integer, required
    - `tokens` LLMRequestTokenSums, required: Token totals for a time bucket.
      - `input` integer, required
      - `output` integer, required
      - `cached` integer, required
      - `thoughts` integer, nullable
      - `total` integer, required
    - `series` object, nullable
  - `retention_days` integer, nullable

## Other responses

- `404`: The bank does not exist.
- `422`: Validation Error

## Changes

- **2026-11-07** `45e711cd0897`: 4 info
  - added the new optional `query` request parameter `call_type`
  - added the new optional `query` request parameter `split_by`
  - added the optional property `buckets/items/series` to the response with the `200` status
  - added the optional property `retention_days` to the response with the `200` status
- **2026-10-04** `4fda98b75f63`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/vectorize/apis/hindsight-http-api/changes/v1/default/banks/:bank_id/llm-requests/stats/get.md)

---

[API](https://skmtc.dev/vectorize/apis/hindsight-http-api.md) - [All operations](https://skmtc.dev/vectorize/apis/hindsight-http-api/llms.txt) - [OpenAPI document](https://skmtc.dev/vectorize/apis/hindsight-http-api/revisions/45e711cd0897?raw)
