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
Example:

1

scoring_config_id
integer | null
Example:

3345

status
string
default:awaiting_execution
Example:

"pending"

model_params
object | null

Optional. The model parameters to use for this run.

Example:
{
  "isCustom": false,
  "maxTokens": 2048,
  "modelName": "gpt-4-1106-preview",
  "temperature": 0,
  "topP": 0.9
}
source
string
default:api
Example:

"api"

notes
string | null
Example:

"This is a test run"

prompt_template
string | null
Example:

"You are a helpful assistant"

metrics
integer[] | null
Example:
[1, 2, 3]
prompt_id
string | null
Example:

"0003ffd4-6d39-4d34-92c1-9cc9c62bbcfd"

Response

200
application/json
Successful Response
id
integer
Example:

1

created_at
string | null

The creation date and time of the run.

Example:

"2025-02-06T00:05:49.935385"

updated_at
string | null

The last time the run was updated.

Example:

"2025-02-06T23:05:49.935508"

execution_start_time
string | null

The start time of the run.

Example:

"2025-02-06T23:35:49.935554"

execution_end_time
string | null

The end time of the run.

Example:

"2025-02-06T23:55:49.935596"

testset_id
integer | null

The testset that was executed in this run.

Example:

1

status
string | null

The current status of the run.

Example:

"completed"

limit_testcases
integer | null

The maximum number of testcases to run.

Example:

10

source
string | null

How the run was created.

Example:

"api"

model_params
object | null

The model parameters used when generating the run.

Example:
{
  "isCustom": false,
  "maxTokens": 2048,
  "modelName": "gpt-4-1106-preview",
  "temperature": 0,
  "topP": 0.9
}
notes
string | null

Notes about the run.

Example:

"This is a test run"

scoring_config_id
integer | null

The ID of the scoring configuration the run uses.

Example:

3345

prompt_template
string | null

The prompt template to be used while executing the run.

Example:

"You are a helpful assistant"

scoring_start_time
string | null

The start time of scoring the run's results.

Example:

"2025-02-07T00:00:49.935969"

scoring_end_time
string | null

The end time of scoring the run's results.

Example:

"2025-02-07T00:04:49.936045"

prompt_id
string | null