Skip to main content
GET
/
v1
/
sessions
/
analytics
get aggregated session analytics
curl --request GET \
  --url https://api.anam.ai/v1/sessions/analytics \
  --header 'Authorization: Bearer <token>'
{
  "from": "2026-04-19T09:00:00.000Z",
  "to": "2026-04-20T09:00:00.000Z",
  "filters": {
    "personaId": null,
    "apiKeyId": null,
    "clientLabel": null,
    "sessionType": null
  },
  "sessionCount": 128,
  "sessionsWithReports": 121,
  "truncated": false,
  "turnCount": 1874,
  "latencies": {
    "transcriptionLatencySeconds": {
      "count": 1702,
      "avg": 0.34,
      "p50": 0.29,
      "p90": 0.52,
      "p95": 0.61,
      "p99": 0.94,
      "max": 1.87
    },
    "llmTimeToFirstOutputSeconds": {
      "count": 1698,
      "avg": 0.61,
      "p50": 0.54,
      "p90": 0.92,
      "p95": 1.18,
      "p99": 2.04,
      "max": 4.31
    },
    "llmGenerationDurationSeconds": {
      "count": 1698,
      "avg": 1.42,
      "p50": 1.31,
      "p90": 2.12,
      "p95": 2.54,
      "p99": 3.87,
      "max": 7.02
    },
    "ttsGenerationDurationSeconds": {
      "count": 1671,
      "avg": 1.18,
      "p50": 1.09,
      "p90": 1.74,
      "p95": 2.02,
      "p99": 2.98,
      "max": 5.44
    },
    "ttsTimeToFirstAudioSeconds": {
      "count": 1671,
      "avg": 0.41,
      "p50": 0.37,
      "p90": 0.62,
      "p95": 0.74,
      "p99": 1.12,
      "max": 2.36
    },
    "firstAudioLatencySeconds": {
      "count": 1698,
      "avg": 1.31,
      "p50": 1.18,
      "p90": 1.86,
      "p95": 2.21,
      "p99": 3.42,
      "max": 6.75
    },
    "speakingDurationSeconds": {
      "count": 1698,
      "avg": 7.85,
      "p50": 6.92,
      "p90": 13.41,
      "p95": 16.08,
      "p99": 22.6,
      "max": 41.19
    },
    "userSpeechDurationSeconds": {
      "count": 1702,
      "avg": 3.62,
      "p50": 3.11,
      "p90": 6.4,
      "p95": 7.83,
      "p99": 11.9,
      "max": 19.75
    }
  },
  "counts": {
    "completedTurns": 1512,
    "interruptedTurns": 186,
    "interruptedBeforeAudioTurns": 22,
    "totalErrors": 4,
    "totalWarnings": 19,
    "sessionsWithErrors": 3,
    "sessionsWithWarnings": 11,
    "toolCalls": {
      "total": 96,
      "succeeded": 91,
      "failed": 5,
      "byName": {
        "lookup_order": 96
      }
    }
  },
  "rates": {
    "interruptionRate": 0.1095,
    "interruptedBeforeAudioRate": 0.013,
    "errorSessionRate": 0.0248,
    "warningSessionRate": 0.0909,
    "toolCallFailureRate": 0.0521
  },
  "slowestTurns": [
    {
      "sessionId": "00000000-0000-0000-0000-000000000000",
      "correlationId": "corr-1042",
      "metric": "firstAudioLatencySeconds",
      "valueSeconds": 6.75,
      "sessionStartTime": "2026-04-20T08:41:12.000Z",
      "personaId": null,
      "clientLabel": "js-sdk-api-key"
    },
    {
      "sessionId": "00000000-0000-0000-0000-000000000000",
      "correlationId": "corr-0311",
      "metric": "llmTimeToFirstOutputSeconds",
      "valueSeconds": 4.31,
      "sessionStartTime": "2026-04-20T07:02:44.000Z",
      "personaId": null,
      "clientLabel": "js-sdk-api-key"
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Query Parameters

from
string<date-time>

Start of the time range (ISO 8601). Defaults to 24 hours before to.

to
string<date-time>

End of the time range (ISO 8601). Defaults to now.

personaId
string<uuid>

Only include sessions for this persona.

apiKeyId
string<uuid>

Only include sessions minted by this API key.

clientLabel
string

Only include sessions whose client label matches exactly.

sessionType
enum<string>

Only include sessions of this type.

Available options:
turnkey,
custom_llm_server,
custom_llm_client,
livekit,
elevenlabs_agent

Response

Successfully computed aggregate analytics

from
string<date-time>
to
string<date-time>
filters
object

Echo of the applied filters.

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 (capped at the 1000 most recent).

truncated
boolean

True when more report-bearing sessions matched than the scan cap; only the most recent 1000 were aggregated.

turnCount
integer
latencies
object

Percentile distributions per latency stage, computed across all turns.

counts
object
rates
object
slowestTurns
object[]

The slowest turns per headline latency metric, for jumping straight to problem sessions.

Last modified on July 6, 2026