Get conversation metrics
curl --request GET \
--url https://voice-api.onclarity.com/v1/projects/{projectId}/conversations/{id}/metrics \
--header 'Authorization: Bearer <token>'import requests
url = "https://voice-api.onclarity.com/v1/projects/{projectId}/conversations/{id}/metrics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://voice-api.onclarity.com/v1/projects/{projectId}/conversations/{id}/metrics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"total_tokens": 18452,
"prompt_tokens": 17210,
"completion_tokens": 1242,
"cached_tokens": 12800,
"tool_call_count": 3,
"e2e_median_latency_ms": 1180,
"num_turns": 9,
"resolution_state": "resolved",
"resolution_reason": "The caller's appointment was moved to Thursday at 10:00."
}{
"error": "Invalid or revoked token"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "Conversation not found"
}Conversations
Get conversation metrics
Returns the quality and cost figures of a conversation: LLM token usage, the number of tool calls and turns, the median end-to-end reply latency, and whether the call was judged resolved. Every field is null until the figures have been recorded (shortly after the call ends), and stays null for calls made before metrics were captured.
GET
/
v1
/
projects
/
{projectId}
/
conversations
/
{id}
/
metrics
Get conversation metrics
curl --request GET \
--url https://voice-api.onclarity.com/v1/projects/{projectId}/conversations/{id}/metrics \
--header 'Authorization: Bearer <token>'import requests
url = "https://voice-api.onclarity.com/v1/projects/{projectId}/conversations/{id}/metrics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://voice-api.onclarity.com/v1/projects/{projectId}/conversations/{id}/metrics', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"total_tokens": 18452,
"prompt_tokens": 17210,
"completion_tokens": 1242,
"cached_tokens": 12800,
"tool_call_count": 3,
"e2e_median_latency_ms": 1180,
"num_turns": 9,
"resolution_state": "resolved",
"resolution_reason": "The caller's appointment was moved to Thursday at 10:00."
}{
"error": "Invalid or revoked token"
}{
"error": "<string>",
"code": "<string>"
}{
"error": "Conversation not found"
}Authorizations
Your organization API key (it starts with anek_org_). The same key works on the Voice API and the Support API. See Authentication.
Response
The conversation's metrics.
Quality and cost figures of one conversation. Null means not recorded.