---
title: "get aggregated session analytics"
method: GET
path: "/v1/sessions/analytics"
tags: ["Sessions"]
---

# get aggregated session analytics

`GET /v1/sessions/analytics`

Returns aggregated latency analytics across sessions — percentile distributions (p50/p90/p95/p99/max/avg) for each stage of the transcription → LLM → TTS → first-audio path, interruption and error rates, tool call outcomes, and a sample of the slowest turns. Only sessions where Anam runs the conversational pipeline (turnkey, custom LLM and ElevenLabs agent sessions) produce analytics reports; LiveKit and audio-passthrough sessions count toward `sessionCount` but never carry analytics. Defaults to the last 24 hours; the maximum range is 31 days. Reports are aggregated from the 1000 most recent report-capable sessions matching the filters — session types that never produce reports don't consume that window — and the `truncated` field reports when more report-capable sessions matched. Narrow the time range or filters to analyse busier periods exhaustively.

## Query parameters

- `from` string, date-time
- `to` string, date-time
- `personaId` string, uuid
- `apiKeyId` string, uuid
- `clientLabel` string
- `sessionType` 'turnkey' | 'custom_llm_server' | 'custom_llm_client' | 'livekit' | 'elevenlabs_agent'
- `organizationId` string

## Response `200`

Successfully computed aggregate analytics

- object
  - `from` string, date-time
  - `to` string, date-time
  - `filters` object — Echo of the applied filters.
    - `personaId` string, nullable
    - `apiKeyId` string, nullable
    - `clientLabel` string, nullable
    - `sessionType` string, nullable
  - `sessionCount` integer — Total sessions matching the filters in the range, whether or not they produced an analytics report.
  - `sessionsWithReports` integer — Sessions whose analytics report was aggregated. Reports are read from the 1000 most recent report-capable matching sessions; session types that never produce reports don't consume that window.
  - `truncated` boolean — True when more than 1000 report-capable sessions matched; only reports among the most recent 1000 of them were aggregated.
  - `turnCount` integer
  - `latencies` object — Percentile distributions per latency stage, computed across all turns.
    - `transcriptionLatencySeconds` LatencyStats — Percentile distribution of a per-turn latency metric, in seconds. Values are null when no turn produced a usable measurement.
      - `count` integer — Number of turns that produced a usable value.
      - `avg` number, nullable
      - `p50` number, nullable
      - `p90` number, nullable
      - `p95` number, nullable
      - `p99` number, nullable
      - `max` number, nullable
    - `llmTimeToFirstOutputSeconds` LatencyStats — Percentile distribution of a per-turn latency metric, in seconds. Values are null when no turn produced a usable measurement.
      - `count` integer — Number of turns that produced a usable value.
      - `avg` number, nullable
      - `p50` number, nullable
      - `p90` number, nullable
      - `p95` number, nullable
      - `p99` number, nullable
      - `max` number, nullable
    - `llmGenerationDurationSeconds` LatencyStats — Percentile distribution of a per-turn latency metric, in seconds. Values are null when no turn produced a usable measurement.
      - `count` integer — Number of turns that produced a usable value.
      - `avg` number, nullable
      - `p50` number, nullable
      - `p90` number, nullable
      - `p95` number, nullable
      - `p99` number, nullable
      - `max` number, nullable
    - `ttsGenerationDurationSeconds` LatencyStats — Percentile distribution of a per-turn latency metric, in seconds. Values are null when no turn produced a usable measurement.
      - `count` integer — Number of turns that produced a usable value.
      - `avg` number, nullable
      - `p50` number, nullable
      - `p90` number, nullable
      - `p95` number, nullable
      - `p99` number, nullable
      - `max` number, nullable
    - `ttsTimeToFirstAudioSeconds` LatencyStats — Percentile distribution of a per-turn latency metric, in seconds. Values are null when no turn produced a usable measurement.
      - `count` integer — Number of turns that produced a usable value.
      - `avg` number, nullable
      - `p50` number, nullable
      - `p90` number, nullable
      - `p95` number, nullable
      - `p99` number, nullable
      - `max` number, nullable
    - `firstAudioLatencySeconds` LatencyStats — Percentile distribution of a per-turn latency metric, in seconds. Values are null when no turn produced a usable measurement.
      - `count` integer — Number of turns that produced a usable value.
      - `avg` number, nullable
      - `p50` number, nullable
      - `p90` number, nullable
      - `p95` number, nullable
      - `p99` number, nullable
      - `max` number, nullable
    - `speakingDurationSeconds` LatencyStats — Percentile distribution of a per-turn latency metric, in seconds. Values are null when no turn produced a usable measurement.
      - `count` integer — Number of turns that produced a usable value.
      - `avg` number, nullable
      - `p50` number, nullable
      - `p90` number, nullable
      - `p95` number, nullable
      - `p99` number, nullable
      - `max` number, nullable
    - `userSpeechDurationSeconds` LatencyStats — Percentile distribution of a per-turn latency metric, in seconds. Values are null when no turn produced a usable measurement.
      - `count` integer — Number of turns that produced a usable value.
      - `avg` number, nullable
      - `p50` number, nullable
      - `p90` number, nullable
      - `p95` number, nullable
      - `p99` number, nullable
      - `max` number, nullable
  - `counts` object
    - `completedTurns` integer
    - `interruptedTurns` integer
    - `interruptedBeforeAudioTurns` integer — Turns interrupted before the persona started speaking.
    - `totalErrors` integer
    - `totalWarnings` integer
    - `sessionsWithErrors` integer
    - `sessionsWithWarnings` integer
    - `toolCalls` object
      - `total` integer
      - `succeeded` integer
      - `failed` integer
      - `byName` object
  - `rates` object
    - `interruptionRate` number, nullable
    - `interruptedBeforeAudioRate` number, nullable
    - `errorSessionRate` number, nullable
    - `warningSessionRate` number, nullable
    - `toolCallFailureRate` number, nullable
  - `slowestTurns` object[] — The slowest turns per headline latency metric, for jumping straight to problem sessions.
    - `sessionId` string, uuid
    - `correlationId` string, nullable
    - `metric` 'transcriptionLatencySeconds' | 'llmTimeToFirstOutputSeconds' | 'ttsTimeToFirstAudioSeconds' | 'firstAudioLatencySeconds'
    - `valueSeconds` number
    - `sessionStartTime` string, date-time
    - `personaId` string, nullable
    - `clientLabel` string, nullable

## Other responses

- `400` — Bad request - Invalid query parameters or date range
- `401` — Unauthorized - Invalid or missing API key
- `403` — Forbidden - API key lacks the required permission
- `500` — Server error

---

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