curl --request POST \
--url https://hiimpria.ai/api/ai/rtProxy/voiceMeter \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"voiceMeterId": "<string>",
"usage": 123,
"cached": 123,
"completion": 123,
"thinking": 123,
"ended": true
}
'import requests
url = "https://hiimpria.ai/api/ai/rtProxy/voiceMeter"
payload = {
"voiceMeterId": "<string>",
"usage": 123,
"cached": 123,
"completion": 123,
"thinking": 123,
"ended": True
}
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({
voiceMeterId: '<string>',
usage: 123,
cached: 123,
completion: 123,
thinking: 123,
ended: true
})
};
fetch('https://hiimpria.ai/api/ai/rtProxy/voiceMeter', 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://hiimpria.ai/api/ai/rtProxy/voiceMeter",
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([
'voiceMeterId' => '<string>',
'usage' => 123,
'cached' => 123,
'completion' => 123,
'thinking' => 123,
'ended' => true
]),
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://hiimpria.ai/api/ai/rtProxy/voiceMeter"
payload := strings.NewReader("{\n \"voiceMeterId\": \"<string>\",\n \"usage\": 123,\n \"cached\": 123,\n \"completion\": 123,\n \"thinking\": 123,\n \"ended\": true\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://hiimpria.ai/api/ai/rtProxy/voiceMeter")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"voiceMeterId\": \"<string>\",\n \"usage\": 123,\n \"cached\": 123,\n \"completion\": 123,\n \"thinking\": 123,\n \"ended\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hiimpria.ai/api/ai/rtProxy/voiceMeter")
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 \"voiceMeterId\": \"<string>\",\n \"usage\": 123,\n \"cached\": 123,\n \"completion\": 123,\n \"thinking\": 123,\n \"ended\": true\n}"
response = http.request(request)
puts response.read_body{
"ok": true
}Report the usage of a live voice call
Sent about once a minute during a call on a voice model that talks to its provider directly from the browser, and once
more when the call ends. The numbers are totals for the session, so a repeated report counts nothing twice. When the
session answer has voiceMeterReports: true, send this with its voiceMeterId. Any session answer with a voiceMeterId wants
the same id as voiceMeterId on each voice turn and on the save.
curl --request POST \
--url https://hiimpria.ai/api/ai/rtProxy/voiceMeter \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"voiceMeterId": "<string>",
"usage": 123,
"cached": 123,
"completion": 123,
"thinking": 123,
"ended": true
}
'import requests
url = "https://hiimpria.ai/api/ai/rtProxy/voiceMeter"
payload = {
"voiceMeterId": "<string>",
"usage": 123,
"cached": 123,
"completion": 123,
"thinking": 123,
"ended": True
}
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({
voiceMeterId: '<string>',
usage: 123,
cached: 123,
completion: 123,
thinking: 123,
ended: true
})
};
fetch('https://hiimpria.ai/api/ai/rtProxy/voiceMeter', 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://hiimpria.ai/api/ai/rtProxy/voiceMeter",
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([
'voiceMeterId' => '<string>',
'usage' => 123,
'cached' => 123,
'completion' => 123,
'thinking' => 123,
'ended' => true
]),
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://hiimpria.ai/api/ai/rtProxy/voiceMeter"
payload := strings.NewReader("{\n \"voiceMeterId\": \"<string>\",\n \"usage\": 123,\n \"cached\": 123,\n \"completion\": 123,\n \"thinking\": 123,\n \"ended\": true\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://hiimpria.ai/api/ai/rtProxy/voiceMeter")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"voiceMeterId\": \"<string>\",\n \"usage\": 123,\n \"cached\": 123,\n \"completion\": 123,\n \"thinking\": 123,\n \"ended\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://hiimpria.ai/api/ai/rtProxy/voiceMeter")
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 \"voiceMeterId\": \"<string>\",\n \"usage\": 123,\n \"cached\": 123,\n \"completion\": 123,\n \"thinking\": 123,\n \"ended\": true\n}"
response = http.request(request)
puts response.read_body{
"ok": true
}Authorizations
JWT token passed in authorization header
Body
The id the voice session answer returned.
Total tokens so far in this session.
Cached tokens so far in this session.
Output tokens so far in this session.
Reasoning tokens so far in this session.
True on the last report of a call.
Response
Recorded. ok is false when the id names no session of the caller.
Was this page helpful?