Hanzo
OpenapiO11y

Lists conversations — gen_ai spans grouped by session.id, with their trace and…

Lists conversations — gen_ai spans grouped by session.id, with their trace and observation counts, tokens and cost.

GET /v1/o11y/llm/sessions

Addresshttps://api.hanzo.ai/v1/o11y/llm/sessions
MethodGET
OperationListLLMSessions
AuthAuthorization: Bearer $HANZO_API_KEY

Lists conversations — gen_ai spans grouped by session.id, with their trace and observation counts, tokens and cost.

Callers need the viewer role; the runtime's own gate enforces it.

Request

9 fields.

FieldInTypeRequiredDescription
startqueryintegerStart is the start of the window as a unix-millisecond epoch.
endqueryintegerEnd is the end of the window as a unix-millisecond epoch.
traceIdquerystringTraceID narrows the view to one trace.
sessionIdquerystringSessionID narrows the view to one conversation.
userIdquerystringUserID narrows the view to one end user.
namequerystringName narrows the view to observations of one name.
modelquerystringModel narrows the view to one model.
offsetqueryintegerOffset is how many rows to skip, for paging.
limitqueryintegerLimit caps how many rows come back.

Response

StatusBodyMeaning
200o11y.O11yLLMSessionsOutok

200 body — 13 fields.

FieldInTypeAlwaysDescription
databodyo11y.O11yLLMSessionsPage
data.itemsbodyo11y.O11yLLMSession[]Items are the conversations, newest first.
data.items[].completionTokensbodyintegerCompletionTokens is the conversation's total output tokens.
data.items[].idbodystringID is the session id.
data.items[].observationsbodyintegerObservations is how many observations the conversation holds.
data.items[].promptTokensbodyintegerPromptTokens is the conversation's total input tokens.
data.items[].totalCostbodynumberTotalCost is the conversation's total cost.
data.items[].totalTokensbodyintegerTotalTokens is the conversation's total tokens.
data.items[].tracesbodyintegerTraces is how many traces the conversation holds.
data.items[].userIdbodystringUserID is the end user the conversation is attributed to.
data.limitbodyintegerLimit is the page cap the read ran with.
data.offsetbodyintegerOffset is the row offset this page started at.
statusbodystringStatus is "success".

Failure carries the platform error shape — see Errors.

Examples

hanzo o11y llm sessions

O11y API · All Hanzo APIs · Interactive reference

How is this guide?

On this page