Skip to main content
GET
/
v1
/
sessions
/
{id}
/
analytics
get session analytics
curl --request GET \
  --url https://api.anam.ai/v1/sessions/{id}/analytics \
  --header 'Authorization: Bearer <token>'
{
  "sessionId": "00000000-0000-0000-0000-000000000000",
  "startTime": "2026-04-20T09:00:00.000Z",
  "endTime": "2026-04-20T09:12:34.000Z",
  "durationSeconds": 754,
  "sessionType": "turnkey",
  "exitStatus": "CLOSED_BY_ENGINE",
  "clientLabel": "js-sdk-api-key",
  "clientMetadata": null,
  "personaId": null,
  "apiKeyId": "00000000-0000-0000-0000-000000000000",
  "config": {
    "llmProvider": "openai",
    "llmModel": "gpt-4o",
    "ttsProvider": "ELEVENLABS",
    "ttsVoice": "lcMyyd2HUfFzxdCaC4Ta",
    "avatarKey": "cara_home",
    "personaName": "Cara",
    "languageCode": "en",
    "transcriptsEnabled": true
  },
  "summary": {
    "totalTurns": 4,
    "completedTurns": 1,
    "interruptedTurns": 1,
    "interruptionRate": 0.5,
    "totalUserSpeechDurationSeconds": 9.4,
    "totalUserWords": 24,
    "totalAssistantWords": 61,
    "totalWarnings": 0,
    "totalErrors": 0,
    "toolCalls": {
      "total": 1,
      "succeeded": 1,
      "failed": 0,
      "byName": {
        "lookup_order": 1
      }
    },
    "averageLatencies": {
      "transcriptionLatencySeconds": 0.31,
      "llmTimeToFirstOutputSeconds": 0.58,
      "ttsGenerationDurationSeconds": 1.12,
      "firstAudioLatencySeconds": 1.24
    }
  },
  "turns": [
    {
      "turnIndex": 0,
      "correlationId": "corr-0000",
      "userSpeechStartTime": null,
      "userSpeechEndTime": null,
      "userSpeechDurationSeconds": null,
      "userTranscriptionTime": null,
      "transcriptionLatencySeconds": null,
      "llmFirstOutputTime": "2026-04-20T09:00:02.100Z",
      "llmFinalOutputTime": "2026-04-20T09:00:03.400Z",
      "llmTimeToFirstOutputSeconds": null,
      "llmGenerationDurationSeconds": 1.3,
      "ttsStartTime": "2026-04-20T09:00:02.200Z",
      "ttsEndTime": "2026-04-20T09:00:03.900Z",
      "ttsGenerationDurationSeconds": 1.7,
      "ttsTimeToFirstAudioSeconds": 0.42,
      "personaStartSpeakingTime": "2026-04-20T09:00:02.620Z",
      "personaStopSpeakingTime": "2026-04-20T09:00:07.100Z",
      "firstAudioLatencySeconds": null,
      "speakingDurationSeconds": 4.48,
      "finishReason": "completed",
      "wasInterrupted": false,
      "interruptedStage": null,
      "toolCalls": []
    },
    {
      "turnIndex": 1,
      "correlationId": "corr-0001",
      "userSpeechStartTime": "2026-04-20T09:00:09.000Z",
      "userSpeechEndTime": "2026-04-20T09:00:11.300Z",
      "userSpeechDurationSeconds": 2.3,
      "userTranscriptionTime": "2026-04-20T09:00:11.640Z",
      "transcriptionLatencySeconds": 0.34,
      "llmFirstOutputTime": "2026-04-20T09:00:12.210Z",
      "llmFinalOutputTime": "2026-04-20T09:00:13.760Z",
      "llmTimeToFirstOutputSeconds": 0.57,
      "llmGenerationDurationSeconds": 1.55,
      "ttsStartTime": "2026-04-20T09:00:12.300Z",
      "ttsEndTime": "2026-04-20T09:00:14.100Z",
      "ttsGenerationDurationSeconds": 1.8,
      "ttsTimeToFirstAudioSeconds": 0.39,
      "personaStartSpeakingTime": "2026-04-20T09:00:12.690Z",
      "personaStopSpeakingTime": "2026-04-20T09:00:16.200Z",
      "firstAudioLatencySeconds": 1.39,
      "speakingDurationSeconds": 3.51,
      "finishReason": "interrupted",
      "wasInterrupted": true,
      "interruptedStage": "while_speaking",
      "toolCalls": [
        {
          "toolCallId": "tool-0001",
          "toolName": "lookup_order",
          "toolType": "SERVER_WEBHOOK",
          "status": "completed",
          "startedAt": "2026-04-20T09:00:12.400Z",
          "completedAt": "2026-04-20T09:00:13.100Z",
          "durationSeconds": 0.7,
          "errorMessage": null
        }
      ]
    }
  ]
}

Authorizations

Authorization
string
header
required

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

Path Parameters

id
string<uuid>
required

Session ID

Query Parameters

includeMessages
boolean
default:false

When true, include the user/assistant message text on each turn. Only honoured when transcripts were enabled for the session and the session is not zero-data-retention; timing metrics are always returned.

Response

Successfully retrieved session analytics

sessionId
string<uuid>
startTime
string<date-time>
endTime
string<date-time> | null
durationSeconds
number | null
sessionType
enum<string> | null
Available options:
turnkey,
custom_llm_server,
custom_llm_client,
livekit,
elevenlabs_agent,
null
exitStatus
string | null
clientLabel
string | null
clientMetadata
object | null
personaId
string<uuid> | null
apiKeyId
string<uuid> | null
config
object

Snapshot of the configuration the session ran with.

summary
object
turns
object[]
Last modified on July 6, 2026