Traces

Where a call's time and cost actually went.

A trace is every step behind one piece of work — the model calls, the tool calls, the retries — with its timings, tokens and cost. Each names the call, agent, campaign or eval run it belongs to, so it joins to the rest of this API rather than sitting in its own world.

Which vendor and which model served each step are not reported. Those change — that is the point of running several — and a dashboard grouped by a model name would break the day one moved. What is reported is the work: how long it took, what it consumed, and whether it failed.

Span payloads — prompts, model output, tool arguments — are not served here. They are the most sensitive thing we hold, since a prompt carries whatever the call was about, and they stay behind the signed-in surface where the reader is identifiable.

List traces

Traces in the organization, newest first. A default time window applies when none is given — an unbounded scan of everything ever produced is not a query to run by accident.

GET/api/v1/traces

Query parameters

ParameterTypeDescription
from
string

ISO date lower bound.

to
string

ISO date upper bound.

callId
string

Traces for one call.

campaignId
string

Traces for one campaign.

agentId
string

Traces for one agent.

evalRunId
string

Traces for one eval run.

status
string

ok or error.

hasError
string

`1` for failures only.

minDurationMs
number

Slow work only.

q
string

Free text over the trace name.

sort
string

startedAt, durationMs, costUsd, totalTokens or errorCount. Prefix with - for descending.

Default: -startedAt

page
number

Page number.

Default: 1

pageSize
number

Up to 200.

Default: 50

Responses

{
"data": {
"traces": [
{
"id": "7a40…",
"name": "call.analysis",
"source": "queue",
"status": "ok",
"durationMs": 4182,
"links": {
"callId": "5f1c…",
"campaignId": "a1…",
"agentId": "44b1…",
"callCenterId": null,
"evalRunId": null
},
"counts": {
"spans": 14,
"llmCalls": 9,
"toolCalls": 2,
"errors": 0
},
"usage": {
"inputTokens": 18422,
"outputTokens": 2201,
"totalTokens": 20623,
"costUsd": 0.0412
},
"tags": []
}
],
"total": 318
},
"meta": {
"requestId": "req_…",
"pagination": {
"nextCursor": "2",
"limit": 50
}
}
}
Request
curl -X GET "https://voice.evryhealth.com/api/v1/traces" \
-H "Authorization: Bearer YOUR_API_KEY"

Get a trace

One trace and every span under it, in order — the waterfall for one piece of work.

GET/api/v1/traces/{traceId}

Path parameters

ParameterTypeDescription
traceIdrequired
string

Trace id.

Responses

{
"data": {
"trace": {
"id": "7a40…",
"name": "call.analysis",
"status": "ok",
"durationMs": 4182
},
"spans": [
{
"id": "b112…",
"parentSpanId": null,
"depth": 0,
"kind": "llm",
"name": "sentiment",
"status": "ok",
"durationMs": 812,
"timeToFirstTokenMs": 240,
"toolName": null,
"usage": {
"inputTokens": 2201,
"outputTokens": 180,
"totalTokens": 2381,
"costUsd": 0.0041
}
}
]
},
"meta": {
"requestId": "req_…"
}
}
Request
curl -X GET "https://voice.evryhealth.com/api/v1/traces/{traceId}" \
-H "Authorization: Bearer YOUR_API_KEY"