List Prompt Commit Test Runs
(v2)GET
Lists the test runs that evaluated the prompt commit with the given hash, newest first, as summaries without metric scores or test cases. Filter by source and page with page and pageSize. Use a test run's id with the test runs endpoints for its scores and test cases. Requires an active trial or paid plan.
curl -X GET "https://api.confident-ai.com/v2/prompts/{promptId}/commits/{hash}/test-runs" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"{
"success": true,
"data": {
"testRuns": [
{
"id": "<TEST-RUN-ID>",
"createdAt": "2025-01-01T12:00:00.000Z",
"identifier": "support-tone-run-3",
"status": "IN_PROGRESS",
"source": "automated",
"testsPassed": 8,
"testsFailed": 2,
"totalTests": 10,
"runDuration": 15.2,
"evaluationCost": 0.254,
"datasetAlias": "support-questions",
"evaluatorCollectionName": "Support Quality",
"actionName": "Nightly regression"
}
],
"totalTestRuns": 12,
"page": 1,
"pageSize": 25
},
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
promptIdstringRequiredThe unique id of the prompt.
hashstringRequiredThe hash of the commit to pull.
Query parameters
pageintegerdefault: 1The page of test runs to return. Defaults to 1.
pageSizeintegerdefault: 25The number of test runs per page, at most 100. Defaults to 25.
sourceenumReturns only test runs started this way. Omit to return all.
Response
List Prompt Commit Test Runs succeeded.
successbooleanIndicates if the request was successful.
dataobjectShow 4 propertiesHide 4 properties
testRunslist of objectsThis is the page of test runs of the commit, newest first.
Show 13 propertiesHide 13 properties
idstringThe unique id of the test run.
createdAtstringThe time the test run was created.
identifierstring | nullThe human-readable identifier you gave the test run, if any.
statusenumThe status of the test run:
IN_PROGRESSwhile test cases are still being evaluated, thenCOMPLETED,ERROREDorCANCELLED.Show 4 enum valuesHide 4 enum values
IN_PROGRESSCOMPLETEDERROREDCANCELLED
sourceenumHow a test run was started:
automatedby a prompt action,experimentfrom a prompt experiment, orapithrough the API or an SDK.Show 3 enum valuesHide 3 enum values
automatedexperimentapi
testsPassedintegerThe number of test cases that passed.
testsFailedintegerThe number of test cases that failed.
totalTestsintegerThe total number of test cases in the test run.
runDurationnumberThe total duration of the test run in seconds.
evaluationCostnumber | nullThe cost of evaluating the test run, if recorded.
datasetAliasstring | nullThe alias of the dataset the test run used, if any.
evaluatorCollectionNamestring | nullThe name of the evaluator collection the test run used, if any.
actionNamestring | nullThe name of the prompt action that started the test run, if it was started by one.
totalTestRunsintegerTotal number of test runs of the commit matching the filters.
pageintegerThe page this response covers.
pageSizeintegerThe number of test runs per page.
deprecatedbooleanIndicates if this endpoint is deprecated.