Skip to main content
POST
/
v5
/
span-assessments
Create Span Assessment
curl --request POST \
  --url https://api.egp.scale.com/v5/span-assessments \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "trace_id": "<string>",
  "comment": "<string>",
  "rating": 3,
  "rubric": {},
  "metadata": {},
  "overwrite": {},
  "span_id": "<string>"
}
'
{
  "assessment_id": "<string>",
  "trace_id": "<string>",
  "span_id": "<string>",
  "created_by": "<string>",
  "object": "span.assessment",
  "comment": "<string>",
  "rating": 3,
  "rubric": {},
  "metadata": {},
  "overwrite": {},
  "account_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Documentation Index

Fetch the complete documentation index at: https://docs.gp.scale.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

x-api-key
string
header
required

Headers

x-selected-account-id
string | null

Body

application/json

Request model for creating span assessment

assessment_type
enum<string>
required

Type of assessment

Available options:
comment,
rating,
approval,
rubric,
metadata,
overwrite
trace_id
string
required

The ID of the trace this assessment is attached to

comment
string

Raw text feedback

rating
integer

Numerical rating (1-5)

Required range: 1 <= x <= 5
approval
enum<string>

Approval status (approved/rejected)

Available options:
approved,
rejected
rubric
Rubric · object

Rule key-value pairs for rubric evaluation

metadata
Metadata · object

Arbitrary JSON object for additional data

overwrite
Overwrite · object

User corrections to span output

span_id
string

The ID of the span this assessment is attached to. If omitted, the assessment is attached to the root span of the trace.

Response

Successful Response

Response model for span assessment

assessment_id
string
required

Unique identifier for the assessment

trace_id
string
required

The trace this assessment is attached to

span_id
string
required

The span this assessment is attached to

created_by
string
required

User who submitted the assessment

assessment_type
enum<string>
required

Type of assessment

Available options:
comment,
rating,
approval,
rubric,
metadata,
overwrite
object
string
default:span.assessment
Allowed value: "span.assessment"
comment
string

Raw text feedback

rating
integer

Numerical rating (1-5)

Required range: 1 <= x <= 5
approval
enum<string>

Approval status (approved/rejected)

Available options:
approved,
rejected
rubric
Rubric · object

Rule key-value pairs for rubric evaluation

metadata
Metadata · object

Arbitrary JSON object for additional data

overwrite
Overwrite · object

User corrections to span output

account_id
string

Account this assessment belongs to

created_at
string<date-time>

When this assessment was created

updated_at
string<date-time>

When this assessment was last updated