GET
/
v1
/
run
/
{run_id}
/
testrecord
/
{testrecord_id}
curl --request GET \
  --url https://api.getscorecard.ai/v1/run/{run_id}/testrecord/{testrecord_id} \
  --header 'X-API-Key: <api-key>'
{
  "id": 15,
  "created_at": "2025-02-06T00:05:50.146678",
  "run_id": 334,
  "testset_id": 13,
  "testcase_id": 124,
  "user_query": "What is the moon made of?",
  "context": "After the Apollo missions, we know the moon is made of cheese.",
  "model_response": "The moon is made of cheese.",
  "ideal": "The moon is made of rock.",
  "custom_inputs": {},
  "custom_labels": {},
  "custom_outputs": {},
  "status": "awaiting_scoring",
  "prompt": "You are a helpful assistant. Use the provided context to answer the user query.",
  "model_params": {
    "isCustom": false,
    "maxTokens": 2048,
    "modelName": "gpt-4-1106-preview",
    "temperature": 0,
    "topP": 0.9
  },
  "model_debug_info": {
    "completion_token_count": 92,
    "latency_seconds": 3.23607873916626,
    "prompt_token_count": 28,
    "total_cost": 0.00304,
    "total_token_count": 120
  },
  "error_message": "Error generating a model response."
}

Authorizations

X-API-Key
string
header
required

Path Parameters

testrecord_id
integer
required
run_id
integer
required

Response

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

The creation date and time of the testrecord.

run_id
integer | null

The ID of the run the testrecord belongs to.

testset_id
integer | null

The ID of the testset the testrecord belongs to.

testcase_id
integer | null

The ID of the testcase the testrecord belongs to.

user_query
string | null

The user query for the testrecord.

context
string | null

The context for the testrecord.

model_response
string | null

The actual response of the model for the testrecord.

ideal
string | null

The ideal response for the testrecord.

custom_inputs
object | null
custom_labels
object | null
custom_outputs
object | null
status
string | null

The current status of the testrecord.

prompt
string | null

The prompt used to generate the testrecord.

model_params
object | null

The model parameters used when generating the testrecord.

model_debug_info
object | null

Debug information produced during the testrecord's generation.

error_message
string | null

The error message for the testrecord.