curl --request GET \
--url https://api.anam.ai/v1/sessions/analytics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.anam.ai/v1/sessions/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/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/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/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/analytics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anam.ai/v1/sessions/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{
"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"
}
]
}{
"error": "Service temporarily unavailable",
"message": "We could not check your API key. Please retry shortly."
}get aggregated session 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.
curl --request GET \
--url https://api.anam.ai/v1/sessions/analytics \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.anam.ai/v1/sessions/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/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/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/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/analytics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.anam.ai/v1/sessions/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{
"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"
}
]
}{
"error": "Service temporarily unavailable",
"message": "We could not check your API key. Please retry shortly."
}Authorizations
Query Parameters
Response
Successfully computed aggregate analytics

