v2

latestOpenAPI 3.1.02026-07-2670186350.6 KB
traces

Get Trace

Get a trace by its id

get/traces/{trace_id}

Path parameters

trace_idstring uuid required

The id of the trace to get

The id of the trace to get

Response

Successful Response

idstring uuid required

The id of the trace

start_timestring date-time nullable

The start time of the trace

end_timestring date-time nullable

The end time of the trace

duration_msinteger nullable

The duration of the trace

statusstring nullable

The status of the trace

namestring nullable

The name of the trace, set to the name of the root span of the trace

inputstring nullable

The input of the trace, set to the input of the root span of the trace

outputstring nullable

The output of the trace, set to the output of the root span of the trace

total_tokensinteger nullable

The total tokens of the trace

span_countinteger nullable

Total number of spans in the trace

generation_countinteger nullable

Number of LLM generation spans in the trace

tool_countinteger nullable

Number of tool/function call spans in the trace

has_errorboolean nullable

Whether any span in the trace has an error

Example response

{
  "spans": [
    {
      "type": "generation",
      "metrics": [
        {
          "dimension": "latency",
          "comment": "Expert feedback"
        }
      ]
    }
  ]
}