curl --request GET \
--url https://api.anam.ai/v1/sessions/{id}/analytics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.anam.ai/v1/sessions/{id}/analytics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.anam.ai/v1/sessions/{id}/analytics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.anam.ai/v1/sessions/{id}/analytics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.anam.ai/v1/sessions/{id}/analytics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.anam.ai/v1/sessions/{id}/analytics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anam.ai/v1/sessions/{id}/analytics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"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
}
]
}
]
}get session analytics
Returns per-turn latency analytics for a session — where time was spent in the transcription → LLM → TTS → first-audio path for each conversational turn, plus session-level summary metrics. Analytics become available once the session has ended and the engine has delivered its session report; until then this endpoint returns 404. Analytics exist only for sessions where Anam runs the conversational pipeline (turnkey, custom LLM and ElevenLabs agent sessions) — LiveKit and audio-passthrough sessions never produce them. Message text is omitted unless includeMessages=true is passed and transcripts were enabled for the session. Anam-internal admin API keys may fetch analytics for sessions of any organization.
curl --request GET \
--url https://api.anam.ai/v1/sessions/{id}/analytics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.anam.ai/v1/sessions/{id}/analytics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.anam.ai/v1/sessions/{id}/analytics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.anam.ai/v1/sessions/{id}/analytics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.anam.ai/v1/sessions/{id}/analytics"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.anam.ai/v1/sessions/{id}/analytics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anam.ai/v1/sessions/{id}/analytics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"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
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Session ID
Query Parameters
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
turnkey, custom_llm_server, custom_llm_client, livekit, elevenlabs_agent, null Snapshot of the configuration the session ran with.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Was this page helpful?

