Skip to main content
GET
/
traces
/
{trace_id}
cURL
curl --request GET \
  --url https://api.opper.ai/v2/traces/{trace_id} \
  --header 'Authorization: Bearer <token>'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "start_time": "2023-11-07T05:31:56Z",
  "end_time": "2023-11-07T05:31:56Z",
  "duration_ms": 123,
  "status": "<string>",
  "name": "<string>",
  "input": "<string>",
  "output": "<string>",
  "total_tokens": 123,
  "spans": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "<string>",
      "start_time": "2023-11-07T05:31:56Z",
      "type": "generation",
      "parent_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "end_time": "2023-11-07T05:31:56Z",
      "duration_ms": 123,
      "error": "<string>",
      "meta": {},
      "data": {
        "input": "<string>",
        "output": "<string>",
        "total_tokens": 123,
        "model": "<string>",
        "instructions": "<string>",
        "function": "<string>",
        "tags": [
          "<string>"
        ],
        "score": 123,
        "generation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "observations": "<string>",
        "scorer_context": {}
      },
      "metrics": [
        {
          "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
          "dimension": "<string>",
          "value": 123,
          "created_at": "2023-11-07T05:31:56Z",
          "comment": "Expert feedback"
        }
      ],
      "score": 123
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

trace_id
string<uuid>
required

The id of the trace to get

Response

Successful Response

id
string<uuid>
required

The id of the trace

start_time
string<date-time> | null

The start time of the trace

end_time
string<date-time> | null

The end time of the trace

duration_ms
integer | null

The duration of the trace

status
string | null

The status of the trace

name
string | null

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

input
string | null

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

output
string | null

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

total_tokens
integer | null

The total tokens of the trace

spans
SpanSchema · object[] | null

The spans of the trace