Report run telemetry
A daemon reports telemetry for a run, by kind: usage (a token and duration snapshot
for the run or one phase; CliqHub adds the cost from model prices) or traces (a batch of
up to 512 trace spans; spans already stored are skipped). This is not the live timeline;
that is Report run activity.
Daemon push: requires the daemon’s realm token (cliq_dt_…) for the realm that owns the run given by run_id.
curl --request POST \
--url https://{host}/v1/runs/report_telemetry \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"kind": "usage",
"snapshot_type": "phase",
"run_id": "0c8d7e6f-5a4b-4c3d-9e2f-1a0b9c8d7e6f",
"phase": "review",
"total_tokens_in": 48210,
"total_tokens_out": 6120,
"total_duration_ms": 270000,
"total_llm_calls": 14,
"total_invocations": 1,
"by_model": {
"claude-sonnet-4-5": {
"provider": "anthropic",
"model": "claude-sonnet-4-5",
"tokens_in": 48210,
"tokens_out": 6120,
"llm_calls": 14
}
}
}
'import requests
url = "https://{host}/v1/runs/report_telemetry"
payload = {
"kind": "usage",
"snapshot_type": "phase",
"run_id": "0c8d7e6f-5a4b-4c3d-9e2f-1a0b9c8d7e6f",
"phase": "review",
"total_tokens_in": 48210,
"total_tokens_out": 6120,
"total_duration_ms": 270000,
"total_llm_calls": 14,
"total_invocations": 1,
"by_model": { "claude-sonnet-4-5": {
"provider": "anthropic",
"model": "claude-sonnet-4-5",
"tokens_in": 48210,
"tokens_out": 6120,
"llm_calls": 14
} }
}
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({
kind: 'usage',
snapshot_type: 'phase',
run_id: '0c8d7e6f-5a4b-4c3d-9e2f-1a0b9c8d7e6f',
phase: 'review',
total_tokens_in: 48210,
total_tokens_out: 6120,
total_duration_ms: 270000,
total_llm_calls: 14,
total_invocations: 1,
by_model: {
'claude-sonnet-4-5': {
provider: 'anthropic',
model: 'claude-sonnet-4-5',
tokens_in: 48210,
tokens_out: 6120,
llm_calls: 14
}
}
})
};
fetch('https://{host}/v1/runs/report_telemetry', 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://{host}/v1/runs/report_telemetry",
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([
'kind' => 'usage',
'snapshot_type' => 'phase',
'run_id' => '0c8d7e6f-5a4b-4c3d-9e2f-1a0b9c8d7e6f',
'phase' => 'review',
'total_tokens_in' => 48210,
'total_tokens_out' => 6120,
'total_duration_ms' => 270000,
'total_llm_calls' => 14,
'total_invocations' => 1,
'by_model' => [
'claude-sonnet-4-5' => [
'provider' => 'anthropic',
'model' => 'claude-sonnet-4-5',
'tokens_in' => 48210,
'tokens_out' => 6120,
'llm_calls' => 14
]
]
]),
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://{host}/v1/runs/report_telemetry"
payload := strings.NewReader("{\n \"kind\": \"usage\",\n \"snapshot_type\": \"phase\",\n \"run_id\": \"0c8d7e6f-5a4b-4c3d-9e2f-1a0b9c8d7e6f\",\n \"phase\": \"review\",\n \"total_tokens_in\": 48210,\n \"total_tokens_out\": 6120,\n \"total_duration_ms\": 270000,\n \"total_llm_calls\": 14,\n \"total_invocations\": 1,\n \"by_model\": {\n \"claude-sonnet-4-5\": {\n \"provider\": \"anthropic\",\n \"model\": \"claude-sonnet-4-5\",\n \"tokens_in\": 48210,\n \"tokens_out\": 6120,\n \"llm_calls\": 14\n }\n }\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://{host}/v1/runs/report_telemetry")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"kind\": \"usage\",\n \"snapshot_type\": \"phase\",\n \"run_id\": \"0c8d7e6f-5a4b-4c3d-9e2f-1a0b9c8d7e6f\",\n \"phase\": \"review\",\n \"total_tokens_in\": 48210,\n \"total_tokens_out\": 6120,\n \"total_duration_ms\": 270000,\n \"total_llm_calls\": 14,\n \"total_invocations\": 1,\n \"by_model\": {\n \"claude-sonnet-4-5\": {\n \"provider\": \"anthropic\",\n \"model\": \"claude-sonnet-4-5\",\n \"tokens_in\": 48210,\n \"tokens_out\": 6120,\n \"llm_calls\": 14\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/v1/runs/report_telemetry")
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 \"kind\": \"usage\",\n \"snapshot_type\": \"phase\",\n \"run_id\": \"0c8d7e6f-5a4b-4c3d-9e2f-1a0b9c8d7e6f\",\n \"phase\": \"review\",\n \"total_tokens_in\": 48210,\n \"total_tokens_out\": 6120,\n \"total_duration_ms\": 270000,\n \"total_llm_calls\": 14,\n \"total_invocations\": 1,\n \"by_model\": {\n \"claude-sonnet-4-5\": {\n \"provider\": \"anthropic\",\n \"model\": \"claude-sonnet-4-5\",\n \"tokens_in\": 48210,\n \"tokens_out\": 6120,\n \"llm_calls\": 14\n }\n }\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
User PAT (cliq_tok_…, including session-scoped) or realm token (cliq_dt_…).
Body
- usage
- traces
Usage snapshot ingest
usage Phase-level or run-level snapshot
phase, run Run id the snapshot belongs to
1Total input tokens
Total output tokens
Total duration in milliseconds
Total LLM calls
Total tool/agent invocations
Phase name when snapshot_type is phase
Per-phase breakdown
Per-agent breakdown
Per-model breakdown
curl --request POST \
--url https://{host}/v1/runs/report_telemetry \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"kind": "usage",
"snapshot_type": "phase",
"run_id": "0c8d7e6f-5a4b-4c3d-9e2f-1a0b9c8d7e6f",
"phase": "review",
"total_tokens_in": 48210,
"total_tokens_out": 6120,
"total_duration_ms": 270000,
"total_llm_calls": 14,
"total_invocations": 1,
"by_model": {
"claude-sonnet-4-5": {
"provider": "anthropic",
"model": "claude-sonnet-4-5",
"tokens_in": 48210,
"tokens_out": 6120,
"llm_calls": 14
}
}
}
'import requests
url = "https://{host}/v1/runs/report_telemetry"
payload = {
"kind": "usage",
"snapshot_type": "phase",
"run_id": "0c8d7e6f-5a4b-4c3d-9e2f-1a0b9c8d7e6f",
"phase": "review",
"total_tokens_in": 48210,
"total_tokens_out": 6120,
"total_duration_ms": 270000,
"total_llm_calls": 14,
"total_invocations": 1,
"by_model": { "claude-sonnet-4-5": {
"provider": "anthropic",
"model": "claude-sonnet-4-5",
"tokens_in": 48210,
"tokens_out": 6120,
"llm_calls": 14
} }
}
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({
kind: 'usage',
snapshot_type: 'phase',
run_id: '0c8d7e6f-5a4b-4c3d-9e2f-1a0b9c8d7e6f',
phase: 'review',
total_tokens_in: 48210,
total_tokens_out: 6120,
total_duration_ms: 270000,
total_llm_calls: 14,
total_invocations: 1,
by_model: {
'claude-sonnet-4-5': {
provider: 'anthropic',
model: 'claude-sonnet-4-5',
tokens_in: 48210,
tokens_out: 6120,
llm_calls: 14
}
}
})
};
fetch('https://{host}/v1/runs/report_telemetry', 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://{host}/v1/runs/report_telemetry",
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([
'kind' => 'usage',
'snapshot_type' => 'phase',
'run_id' => '0c8d7e6f-5a4b-4c3d-9e2f-1a0b9c8d7e6f',
'phase' => 'review',
'total_tokens_in' => 48210,
'total_tokens_out' => 6120,
'total_duration_ms' => 270000,
'total_llm_calls' => 14,
'total_invocations' => 1,
'by_model' => [
'claude-sonnet-4-5' => [
'provider' => 'anthropic',
'model' => 'claude-sonnet-4-5',
'tokens_in' => 48210,
'tokens_out' => 6120,
'llm_calls' => 14
]
]
]),
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://{host}/v1/runs/report_telemetry"
payload := strings.NewReader("{\n \"kind\": \"usage\",\n \"snapshot_type\": \"phase\",\n \"run_id\": \"0c8d7e6f-5a4b-4c3d-9e2f-1a0b9c8d7e6f\",\n \"phase\": \"review\",\n \"total_tokens_in\": 48210,\n \"total_tokens_out\": 6120,\n \"total_duration_ms\": 270000,\n \"total_llm_calls\": 14,\n \"total_invocations\": 1,\n \"by_model\": {\n \"claude-sonnet-4-5\": {\n \"provider\": \"anthropic\",\n \"model\": \"claude-sonnet-4-5\",\n \"tokens_in\": 48210,\n \"tokens_out\": 6120,\n \"llm_calls\": 14\n }\n }\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://{host}/v1/runs/report_telemetry")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"kind\": \"usage\",\n \"snapshot_type\": \"phase\",\n \"run_id\": \"0c8d7e6f-5a4b-4c3d-9e2f-1a0b9c8d7e6f\",\n \"phase\": \"review\",\n \"total_tokens_in\": 48210,\n \"total_tokens_out\": 6120,\n \"total_duration_ms\": 270000,\n \"total_llm_calls\": 14,\n \"total_invocations\": 1,\n \"by_model\": {\n \"claude-sonnet-4-5\": {\n \"provider\": \"anthropic\",\n \"model\": \"claude-sonnet-4-5\",\n \"tokens_in\": 48210,\n \"tokens_out\": 6120,\n \"llm_calls\": 14\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://{host}/v1/runs/report_telemetry")
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 \"kind\": \"usage\",\n \"snapshot_type\": \"phase\",\n \"run_id\": \"0c8d7e6f-5a4b-4c3d-9e2f-1a0b9c8d7e6f\",\n \"phase\": \"review\",\n \"total_tokens_in\": 48210,\n \"total_tokens_out\": 6120,\n \"total_duration_ms\": 270000,\n \"total_llm_calls\": 14,\n \"total_invocations\": 1,\n \"by_model\": {\n \"claude-sonnet-4-5\": {\n \"provider\": \"anthropic\",\n \"model\": \"claude-sonnet-4-5\",\n \"tokens_in\": 48210,\n \"tokens_out\": 6120,\n \"llm_calls\": 14\n }\n }\n}"
response = http.request(request)
puts response.read_body