POST
/
v1
/
run
curl --request POST \
  --url https://api.getscorecard.ai/v1/run \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '{
  "testset_id": 1,
  "scoring_config_id": 3345,
  "status": "pending",
  "model_params": {
    "isCustom": false,
    "maxTokens": 2048,
    "modelName": "gpt-4-1106-preview",
    "temperature": 0,
    "topP": 0.9
  },
  "source": "api",
  "notes": "This is a test run",
  "prompt_template": "You are a helpful assistant",
  "metrics": [
    1,
    2,
    3
  ],
  "prompt_id": "0003ffd4-6d39-4d34-92c1-9cc9c62bbcfd"
}'
{
  "id": 1,
  "created_at": "2025-02-06T00:05:49.935385",
  "updated_at": "2025-02-06T23:05:49.935508",
  "execution_start_time": "2025-02-06T23:35:49.935554",
  "execution_end_time": "2025-02-06T23:55:49.935596",
  "testset_id": 1,
  "status": "completed",
  "limit_testcases": 10,
  "source": "api",
  "model_params": {
    "isCustom": false,
    "maxTokens": 2048,
    "modelName": "gpt-4-1106-preview",
    "temperature": 0,
    "topP": 0.9
  },
  "notes": "This is a test run",
  "scoring_config_id": 3345,
  "prompt_template": "You are a helpful assistant",
  "scoring_start_time": "2025-02-07T00:00:49.935969",
  "scoring_end_time": "2025-02-07T00:04:49.936045",
  "prompt_id": "<string>"
}

Authorizations

X-API-Key
string
header
required

Body

application/json
testset_id
integer | null
scoring_config_id
integer | null
status
string
default:
awaiting_execution
model_params
object | null

Optional. The model parameters to use for this run.

source
string
default:
api
notes
string | null
prompt_template
string | null
metrics
integer[] | null
prompt_id
string | null

Response

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

The creation date and time of the run.

updated_at
string | null

The last time the run was updated.

execution_start_time
string | null

The start time of the run.

execution_end_time
string | null

The end time of the run.

testset_id
integer | null

The testset that was executed in this run.

status
string | null

The current status of the run.

limit_testcases
integer | null

The maximum number of testcases to run.

source
string | null

How the run was created.

model_params
object | null

The model parameters used when generating the run.

notes
string | null

Notes about the run.

scoring_config_id
integer | null

The ID of the scoring configuration the run uses.

prompt_template
string | null

The prompt template to be used while executing the run.

scoring_start_time
string | null

The start time of scoring the run's results.

scoring_end_time
string | null

The end time of scoring the run's results.

prompt_id
string | null