Skip to main content
POST
/
spans
/
{spanId}
/
evaluations
curl -X POST https://app.tracia.io/api/v1/spans/sp_abc123def456/evaluations \
  -H "Authorization: Bearer tr_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "evaluatorKey": "quality",
    "value": 1,
    "note": "Response was accurate and helpful"
  }'
{
  "id": "eval_xyz789",
  "evaluatorKey": "quality",
  "evaluatorName": "Quality",
  "value": 1,
  "source": "api",
  "note": "Response was accurate and helpful",
  "createdAt": "2024-01-15T10:35:00.000Z"
}

Request

Authorization
string
required
Bearer token with your API key: Bearer tr_your_api_key
spanId
string
required
The span ID to evaluate (e.g., sp_abc123def456)
evaluatorKey
string
required
The evaluator key. Currently only quality is supported.
value
number
required
The evaluation score. Use 1 for positive or 0 for negative.
note
string
Optional note explaining the evaluation

Response

id
string
Unique identifier for the evaluation
evaluatorKey
string
Key of the evaluator used
evaluatorName
string
Display name of the evaluator
value
number
The evaluation score
source
string
Source of the evaluation (e.g., api, dashboard)
note
string | null
Optional note explaining the evaluation
createdAt
string
ISO 8601 timestamp
curl -X POST https://app.tracia.io/api/v1/spans/sp_abc123def456/evaluations \
  -H "Authorization: Bearer tr_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "evaluatorKey": "quality",
    "value": 1,
    "note": "Response was accurate and helpful"
  }'
{
  "id": "eval_xyz789",
  "evaluatorKey": "quality",
  "evaluatorName": "Quality",
  "value": 1,
  "source": "api",
  "note": "Response was accurate and helpful",
  "createdAt": "2024-01-15T10:35:00.000Z"
}

Authorizations

Authorization
string
header
required

API key starting with tr_

Path Parameters

spanId
string
required

The span ID to evaluate (e.g., sp_abc123def456)

Body

application/json
evaluatorKey
string
required

The evaluator key. Currently only quality is supported.

value
number
required

The evaluation score. Use 1 for positive or 0 for negative.

note
string

Optional note explaining the evaluation

Response

Evaluation created

id
string

Unique identifier for the evaluation

evaluatorKey
string

Key of the evaluator used

evaluatorName
string

Display name of the evaluator

value
number

The evaluation score

source
string

Source of the evaluation (e.g., api, dashboard)

note
string | null

Optional note explaining the evaluation

createdAt
string<date-time>

ISO 8601 timestamp of creation