PATCH
/
v1
/
run
/
{run_id}
/
testrecord
/
{testrecord_id}
/
score
/
{score_id}
curl --request PATCH \
  --url https://api.getscorecard.ai/v1/run/{run_id}/testrecord/{testrecord_id}/score/{score_id} \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "int_score": 1,
  "binary_score": false,
  "reasoning": "Turns out the moon insn'\''t acutally made of cheese."
}'
{
  "user_id": "<string>",
  "id": 1,
  "run_id": 1,
  "testcase_id": 1,
  "testrecord_id": 1,
  "metric_id": 1,
  "binary_score": true,
  "int_score": 1,
  "reasoning": "The moon is not made of cheese so this result is not factual.",
  "human_eval": true,
  "status": "pending",
  "error_message": "An error occurred while creating the grade.",
  "created_at": "2025-02-06T23:05:50.132525",
  "updated_at": "2025-02-07T00:04:50.132584"
}

Authorizations

X-API-Key
string
header
required

Path Parameters

run_id
integer
required

The run ID that created the test record to be scored.

testrecord_id
integer
required

The ID of the testrecord whose score will be updated.

score_id
integer
required

The ID of the score to be updated.

Body

application/json
int_score
integer | null
required

The new integer score to assign.

binary_score
boolean | null
required

The new boolean score to assign.

reasoning
string | null
required

The reasoning for the score update.

Response

200
application/json
Successful Response
user_id
string | null
id
integer | null

The ID of the grade.

run_id
integer | null

The ID of the run that created the grade.

testcase_id
integer | null

The ID of the testcase associated with the grade.

testrecord_id
integer | null

The ID of the testrecord for which the grade was created.

metric_id
integer | null

The ID of the metric used to compute the grade.

binary_score
boolean | null

The binary score assigned to the grade.

int_score
integer | null

The integer score assigned to the grade.

reasoning
string | null

The reasoning for the assigned score.

human_eval
boolean
default:
true

Indicates if a human should assign a grade.

status
enum<string>
default:
pending

The status of the grade.

Available options:
pending,
error,
completed
error_message
string | null

The error message if the grade was not created successfully.

created_at
string | null

when the grade was created.

updated_at
string | null

when the grade was last updated.