cURL
curl --request POST \
--url https://api.comm.com/api/v1/webhooks/calls/metrics/pipecat \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"call_id": "<string>",
"trace_id": "<string>",
"session_id": "<string>",
"stt_ttfb": "<string>",
"stt_total_time": "<string>",
"llm_ttft": "<string>",
"llm_total_time": "<string>",
"tts_ttfb": "<string>",
"tts_total_time": "<string>",
"voice_to_voice_latency": "<string>",
"stt_provider": "<string>",
"llm_provider": "<string>",
"llm_model": "<string>",
"tts_provider": "<string>",
"input_tokens": 0,
"output_tokens": 0,
"audio_tokens": 0,
"cached_tokens": 0,
"reasoning_tokens": 0,
"tts_characters": 0,
"stt_audio_seconds": 0,
"estimated_llm_cost": 0,
"estimated_stt_cost": 0,
"estimated_tts_cost": 0,
"interruption_count": 0,
"turn_switches": 0,
"stt_errors": 0,
"llm_errors": 0,
"tts_errors": 0,
"errors": "<string>",
"fallback_events": "<string>",
"fallback_count": 0
}
'import requests
url = "https://api.comm.com/api/v1/webhooks/calls/metrics/pipecat"
payload = {
"call_id": "<string>",
"trace_id": "<string>",
"session_id": "<string>",
"stt_ttfb": "<string>",
"stt_total_time": "<string>",
"llm_ttft": "<string>",
"llm_total_time": "<string>",
"tts_ttfb": "<string>",
"tts_total_time": "<string>",
"voice_to_voice_latency": "<string>",
"stt_provider": "<string>",
"llm_provider": "<string>",
"llm_model": "<string>",
"tts_provider": "<string>",
"input_tokens": 0,
"output_tokens": 0,
"audio_tokens": 0,
"cached_tokens": 0,
"reasoning_tokens": 0,
"tts_characters": 0,
"stt_audio_seconds": 0,
"estimated_llm_cost": 0,
"estimated_stt_cost": 0,
"estimated_tts_cost": 0,
"interruption_count": 0,
"turn_switches": 0,
"stt_errors": 0,
"llm_errors": 0,
"tts_errors": 0,
"errors": "<string>",
"fallback_events": "<string>",
"fallback_count": 0
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
call_id: '<string>',
trace_id: '<string>',
session_id: '<string>',
stt_ttfb: '<string>',
stt_total_time: '<string>',
llm_ttft: '<string>',
llm_total_time: '<string>',
tts_ttfb: '<string>',
tts_total_time: '<string>',
voice_to_voice_latency: '<string>',
stt_provider: '<string>',
llm_provider: '<string>',
llm_model: '<string>',
tts_provider: '<string>',
input_tokens: 0,
output_tokens: 0,
audio_tokens: 0,
cached_tokens: 0,
reasoning_tokens: 0,
tts_characters: 0,
stt_audio_seconds: 0,
estimated_llm_cost: 0,
estimated_stt_cost: 0,
estimated_tts_cost: 0,
interruption_count: 0,
turn_switches: 0,
stt_errors: 0,
llm_errors: 0,
tts_errors: 0,
errors: '<string>',
fallback_events: '<string>',
fallback_count: 0
})
};
fetch('https://api.comm.com/api/v1/webhooks/calls/metrics/pipecat', 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.comm.com/api/v1/webhooks/calls/metrics/pipecat",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'call_id' => '<string>',
'trace_id' => '<string>',
'session_id' => '<string>',
'stt_ttfb' => '<string>',
'stt_total_time' => '<string>',
'llm_ttft' => '<string>',
'llm_total_time' => '<string>',
'tts_ttfb' => '<string>',
'tts_total_time' => '<string>',
'voice_to_voice_latency' => '<string>',
'stt_provider' => '<string>',
'llm_provider' => '<string>',
'llm_model' => '<string>',
'tts_provider' => '<string>',
'input_tokens' => 0,
'output_tokens' => 0,
'audio_tokens' => 0,
'cached_tokens' => 0,
'reasoning_tokens' => 0,
'tts_characters' => 0,
'stt_audio_seconds' => 0,
'estimated_llm_cost' => 0,
'estimated_stt_cost' => 0,
'estimated_tts_cost' => 0,
'interruption_count' => 0,
'turn_switches' => 0,
'stt_errors' => 0,
'llm_errors' => 0,
'tts_errors' => 0,
'errors' => '<string>',
'fallback_events' => '<string>',
'fallback_count' => 0
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.comm.com/api/v1/webhooks/calls/metrics/pipecat"
payload := strings.NewReader("{\n \"call_id\": \"<string>\",\n \"trace_id\": \"<string>\",\n \"session_id\": \"<string>\",\n \"stt_ttfb\": \"<string>\",\n \"stt_total_time\": \"<string>\",\n \"llm_ttft\": \"<string>\",\n \"llm_total_time\": \"<string>\",\n \"tts_ttfb\": \"<string>\",\n \"tts_total_time\": \"<string>\",\n \"voice_to_voice_latency\": \"<string>\",\n \"stt_provider\": \"<string>\",\n \"llm_provider\": \"<string>\",\n \"llm_model\": \"<string>\",\n \"tts_provider\": \"<string>\",\n \"input_tokens\": 0,\n \"output_tokens\": 0,\n \"audio_tokens\": 0,\n \"cached_tokens\": 0,\n \"reasoning_tokens\": 0,\n \"tts_characters\": 0,\n \"stt_audio_seconds\": 0,\n \"estimated_llm_cost\": 0,\n \"estimated_stt_cost\": 0,\n \"estimated_tts_cost\": 0,\n \"interruption_count\": 0,\n \"turn_switches\": 0,\n \"stt_errors\": 0,\n \"llm_errors\": 0,\n \"tts_errors\": 0,\n \"errors\": \"<string>\",\n \"fallback_events\": \"<string>\",\n \"fallback_count\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.comm.com/api/v1/webhooks/calls/metrics/pipecat")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"call_id\": \"<string>\",\n \"trace_id\": \"<string>\",\n \"session_id\": \"<string>\",\n \"stt_ttfb\": \"<string>\",\n \"stt_total_time\": \"<string>\",\n \"llm_ttft\": \"<string>\",\n \"llm_total_time\": \"<string>\",\n \"tts_ttfb\": \"<string>\",\n \"tts_total_time\": \"<string>\",\n \"voice_to_voice_latency\": \"<string>\",\n \"stt_provider\": \"<string>\",\n \"llm_provider\": \"<string>\",\n \"llm_model\": \"<string>\",\n \"tts_provider\": \"<string>\",\n \"input_tokens\": 0,\n \"output_tokens\": 0,\n \"audio_tokens\": 0,\n \"cached_tokens\": 0,\n \"reasoning_tokens\": 0,\n \"tts_characters\": 0,\n \"stt_audio_seconds\": 0,\n \"estimated_llm_cost\": 0,\n \"estimated_stt_cost\": 0,\n \"estimated_tts_cost\": 0,\n \"interruption_count\": 0,\n \"turn_switches\": 0,\n \"stt_errors\": 0,\n \"llm_errors\": 0,\n \"tts_errors\": 0,\n \"errors\": \"<string>\",\n \"fallback_events\": \"<string>\",\n \"fallback_count\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.comm.com/api/v1/webhooks/calls/metrics/pipecat")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"call_id\": \"<string>\",\n \"trace_id\": \"<string>\",\n \"session_id\": \"<string>\",\n \"stt_ttfb\": \"<string>\",\n \"stt_total_time\": \"<string>\",\n \"llm_ttft\": \"<string>\",\n \"llm_total_time\": \"<string>\",\n \"tts_ttfb\": \"<string>\",\n \"tts_total_time\": \"<string>\",\n \"voice_to_voice_latency\": \"<string>\",\n \"stt_provider\": \"<string>\",\n \"llm_provider\": \"<string>\",\n \"llm_model\": \"<string>\",\n \"tts_provider\": \"<string>\",\n \"input_tokens\": 0,\n \"output_tokens\": 0,\n \"audio_tokens\": 0,\n \"cached_tokens\": 0,\n \"reasoning_tokens\": 0,\n \"tts_characters\": 0,\n \"stt_audio_seconds\": 0,\n \"estimated_llm_cost\": 0,\n \"estimated_stt_cost\": 0,\n \"estimated_tts_cost\": 0,\n \"interruption_count\": 0,\n \"turn_switches\": 0,\n \"stt_errors\": 0,\n \"llm_errors\": 0,\n \"tts_errors\": 0,\n \"errors\": \"<string>\",\n \"fallback_events\": \"<string>\",\n \"fallback_count\": 0\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"error": "Call not found"
}{
"success": true,
"error": "<string>"
}Calls
Post v1webhookscallsmetricspipecat
POST
/
v1
/
webhooks
/
calls
/
metrics
/
pipecat
cURL
curl --request POST \
--url https://api.comm.com/api/v1/webhooks/calls/metrics/pipecat \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"call_id": "<string>",
"trace_id": "<string>",
"session_id": "<string>",
"stt_ttfb": "<string>",
"stt_total_time": "<string>",
"llm_ttft": "<string>",
"llm_total_time": "<string>",
"tts_ttfb": "<string>",
"tts_total_time": "<string>",
"voice_to_voice_latency": "<string>",
"stt_provider": "<string>",
"llm_provider": "<string>",
"llm_model": "<string>",
"tts_provider": "<string>",
"input_tokens": 0,
"output_tokens": 0,
"audio_tokens": 0,
"cached_tokens": 0,
"reasoning_tokens": 0,
"tts_characters": 0,
"stt_audio_seconds": 0,
"estimated_llm_cost": 0,
"estimated_stt_cost": 0,
"estimated_tts_cost": 0,
"interruption_count": 0,
"turn_switches": 0,
"stt_errors": 0,
"llm_errors": 0,
"tts_errors": 0,
"errors": "<string>",
"fallback_events": "<string>",
"fallback_count": 0
}
'import requests
url = "https://api.comm.com/api/v1/webhooks/calls/metrics/pipecat"
payload = {
"call_id": "<string>",
"trace_id": "<string>",
"session_id": "<string>",
"stt_ttfb": "<string>",
"stt_total_time": "<string>",
"llm_ttft": "<string>",
"llm_total_time": "<string>",
"tts_ttfb": "<string>",
"tts_total_time": "<string>",
"voice_to_voice_latency": "<string>",
"stt_provider": "<string>",
"llm_provider": "<string>",
"llm_model": "<string>",
"tts_provider": "<string>",
"input_tokens": 0,
"output_tokens": 0,
"audio_tokens": 0,
"cached_tokens": 0,
"reasoning_tokens": 0,
"tts_characters": 0,
"stt_audio_seconds": 0,
"estimated_llm_cost": 0,
"estimated_stt_cost": 0,
"estimated_tts_cost": 0,
"interruption_count": 0,
"turn_switches": 0,
"stt_errors": 0,
"llm_errors": 0,
"tts_errors": 0,
"errors": "<string>",
"fallback_events": "<string>",
"fallback_count": 0
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
call_id: '<string>',
trace_id: '<string>',
session_id: '<string>',
stt_ttfb: '<string>',
stt_total_time: '<string>',
llm_ttft: '<string>',
llm_total_time: '<string>',
tts_ttfb: '<string>',
tts_total_time: '<string>',
voice_to_voice_latency: '<string>',
stt_provider: '<string>',
llm_provider: '<string>',
llm_model: '<string>',
tts_provider: '<string>',
input_tokens: 0,
output_tokens: 0,
audio_tokens: 0,
cached_tokens: 0,
reasoning_tokens: 0,
tts_characters: 0,
stt_audio_seconds: 0,
estimated_llm_cost: 0,
estimated_stt_cost: 0,
estimated_tts_cost: 0,
interruption_count: 0,
turn_switches: 0,
stt_errors: 0,
llm_errors: 0,
tts_errors: 0,
errors: '<string>',
fallback_events: '<string>',
fallback_count: 0
})
};
fetch('https://api.comm.com/api/v1/webhooks/calls/metrics/pipecat', 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.comm.com/api/v1/webhooks/calls/metrics/pipecat",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'call_id' => '<string>',
'trace_id' => '<string>',
'session_id' => '<string>',
'stt_ttfb' => '<string>',
'stt_total_time' => '<string>',
'llm_ttft' => '<string>',
'llm_total_time' => '<string>',
'tts_ttfb' => '<string>',
'tts_total_time' => '<string>',
'voice_to_voice_latency' => '<string>',
'stt_provider' => '<string>',
'llm_provider' => '<string>',
'llm_model' => '<string>',
'tts_provider' => '<string>',
'input_tokens' => 0,
'output_tokens' => 0,
'audio_tokens' => 0,
'cached_tokens' => 0,
'reasoning_tokens' => 0,
'tts_characters' => 0,
'stt_audio_seconds' => 0,
'estimated_llm_cost' => 0,
'estimated_stt_cost' => 0,
'estimated_tts_cost' => 0,
'interruption_count' => 0,
'turn_switches' => 0,
'stt_errors' => 0,
'llm_errors' => 0,
'tts_errors' => 0,
'errors' => '<string>',
'fallback_events' => '<string>',
'fallback_count' => 0
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.comm.com/api/v1/webhooks/calls/metrics/pipecat"
payload := strings.NewReader("{\n \"call_id\": \"<string>\",\n \"trace_id\": \"<string>\",\n \"session_id\": \"<string>\",\n \"stt_ttfb\": \"<string>\",\n \"stt_total_time\": \"<string>\",\n \"llm_ttft\": \"<string>\",\n \"llm_total_time\": \"<string>\",\n \"tts_ttfb\": \"<string>\",\n \"tts_total_time\": \"<string>\",\n \"voice_to_voice_latency\": \"<string>\",\n \"stt_provider\": \"<string>\",\n \"llm_provider\": \"<string>\",\n \"llm_model\": \"<string>\",\n \"tts_provider\": \"<string>\",\n \"input_tokens\": 0,\n \"output_tokens\": 0,\n \"audio_tokens\": 0,\n \"cached_tokens\": 0,\n \"reasoning_tokens\": 0,\n \"tts_characters\": 0,\n \"stt_audio_seconds\": 0,\n \"estimated_llm_cost\": 0,\n \"estimated_stt_cost\": 0,\n \"estimated_tts_cost\": 0,\n \"interruption_count\": 0,\n \"turn_switches\": 0,\n \"stt_errors\": 0,\n \"llm_errors\": 0,\n \"tts_errors\": 0,\n \"errors\": \"<string>\",\n \"fallback_events\": \"<string>\",\n \"fallback_count\": 0\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.comm.com/api/v1/webhooks/calls/metrics/pipecat")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"call_id\": \"<string>\",\n \"trace_id\": \"<string>\",\n \"session_id\": \"<string>\",\n \"stt_ttfb\": \"<string>\",\n \"stt_total_time\": \"<string>\",\n \"llm_ttft\": \"<string>\",\n \"llm_total_time\": \"<string>\",\n \"tts_ttfb\": \"<string>\",\n \"tts_total_time\": \"<string>\",\n \"voice_to_voice_latency\": \"<string>\",\n \"stt_provider\": \"<string>\",\n \"llm_provider\": \"<string>\",\n \"llm_model\": \"<string>\",\n \"tts_provider\": \"<string>\",\n \"input_tokens\": 0,\n \"output_tokens\": 0,\n \"audio_tokens\": 0,\n \"cached_tokens\": 0,\n \"reasoning_tokens\": 0,\n \"tts_characters\": 0,\n \"stt_audio_seconds\": 0,\n \"estimated_llm_cost\": 0,\n \"estimated_stt_cost\": 0,\n \"estimated_tts_cost\": 0,\n \"interruption_count\": 0,\n \"turn_switches\": 0,\n \"stt_errors\": 0,\n \"llm_errors\": 0,\n \"tts_errors\": 0,\n \"errors\": \"<string>\",\n \"fallback_events\": \"<string>\",\n \"fallback_count\": 0\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.comm.com/api/v1/webhooks/calls/metrics/pipecat")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"call_id\": \"<string>\",\n \"trace_id\": \"<string>\",\n \"session_id\": \"<string>\",\n \"stt_ttfb\": \"<string>\",\n \"stt_total_time\": \"<string>\",\n \"llm_ttft\": \"<string>\",\n \"llm_total_time\": \"<string>\",\n \"tts_ttfb\": \"<string>\",\n \"tts_total_time\": \"<string>\",\n \"voice_to_voice_latency\": \"<string>\",\n \"stt_provider\": \"<string>\",\n \"llm_provider\": \"<string>\",\n \"llm_model\": \"<string>\",\n \"tts_provider\": \"<string>\",\n \"input_tokens\": 0,\n \"output_tokens\": 0,\n \"audio_tokens\": 0,\n \"cached_tokens\": 0,\n \"reasoning_tokens\": 0,\n \"tts_characters\": 0,\n \"stt_audio_seconds\": 0,\n \"estimated_llm_cost\": 0,\n \"estimated_stt_cost\": 0,\n \"estimated_tts_cost\": 0,\n \"interruption_count\": 0,\n \"turn_switches\": 0,\n \"stt_errors\": 0,\n \"llm_errors\": 0,\n \"tts_errors\": 0,\n \"errors\": \"<string>\",\n \"fallback_events\": \"<string>\",\n \"fallback_count\": 0\n}"
response = http.request(request)
puts response.read_body{
"success": true
}{
"error": "Call not found"
}{
"success": true,
"error": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
application/json
Latency metrics (milliseconds)
Provider details
LLM Token usage
TTS usage
STT usage
Cost estimates
Quality metrics
Error counts
Response
⌘I