Skip to main content
GET
/
traces
/
session
/
{sessionId}
List Session Traces
curl --request GET \
  --url https://voice-livekit.studio.lyzr.ai/v1/traces/session/{sessionId} \
  --header 'x-api-key: <api-key>'
{
  "traces": [
    {
      "traceId": "trace-abc-123",
      "name": "voice-agent-response",
      "sessionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
      "timestamp": "2026-03-25T18:19:24.347Z",
      "latencySeconds": 1.25,
      "totalCostUsd": 0.0034,
      "observationCount": 4,
      "htmlPath": "/traces/view/trace-abc-123"
    }
  ],
  "pagination": {
    "page": 1,
    "limit": 10,
    "totalItems": 45,
    "totalPages": 5
  }
}
Retrieve deep observability metrics and execution traces for a specific voice session. Powered by our Langfuse integration, traces provide a “under the hood” look at exactly what your Voice Agent was thinking and doing during a conversation. This endpoint is vital for debugging slow response times, auditing prompt logic, and tracking your exact LLM token costs per call.
Authentication Required: You must include your API key in the x-api-key header to authenticate this request. You can only view traces for sessions within your authorized scope.

Required Parameters & Pagination

  • sessionId (Path Parameter): The unique UUID of the LiveKit session you want to inspect.
Because a single session might generate many internal traces (e.g., one for STT, one for LLM reasoning, one for TTS generation), this endpoint is paginated using query parameters:
  • page: The specific page of results you want to fetch (defaults to 1).
  • limit: How many trace objects to return per page.

Understanding the Trace Payload

A successful request returns a list of trace objects and pagination metadata. Each trace in the traces array contains actionable insights:
  • latencySeconds: Exactly how long this specific generation or action took. If your agent is responding slowly, look for spikes here to identify the bottleneck.
  • totalCostUsd: The calculated cost of the tokens consumed during this trace, allowing you to monitor unit economics on a per-call basis.
  • observationCount: The number of individual steps or spans recorded within this trace.
  • htmlPath: A highly useful localized path or URL you can use to visualize the trace in a graphical UI (if supported by your dashboard implementation).

Authorizations

x-api-key
string
header
required

Path Parameters

sessionId
string<uuid>
required

The unique UUID of the LiveKit session.

Example:

"3fa85f64-5717-4562-b3fc-2c963f66afa6"

Query Parameters

page
integer

The page number to retrieve for pagination.

Example:

1

limit
integer

The maximum number of traces to return per page.

Example:

10

Response

Trace list retrieved successfully.

traces
object[]
pagination
object