Introducing Confident Voice: Watch the Launch Video Now

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.

GET/v2/prompts/{promptId}/commits/{hash}/test-runs
curl -X GET "https://api.confident-ai.com/v2/prompts/{promptId}/commits/{hash}/test-runs" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"
200
{
  "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_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • promptIdstringRequired

    The unique id of the prompt.

  • hashstringRequired

    The hash of the commit to pull.

Query parameters

  • pageintegerdefault: 1

    The page of test runs to return. Defaults to 1.

  • pageSizeintegerdefault: 25

    The number of test runs per page, at most 100. Defaults to 25.

  • sourceenum

    Returns only test runs started this way. Omit to return all.

Response

List Prompt Commit Test Runs succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    Show 4 propertiesHide 4 properties
    • testRunslist of objects

      This is the page of test runs of the commit, newest first.

      Show 13 propertiesHide 13 properties
      • idstring

        The unique id of the test run.

      • createdAtstring

        The time the test run was created.

      • identifierstring | null

        The human-readable identifier you gave the test run, if any.

      • statusenum

        The status of the test run: IN_PROGRESS while test cases are still being evaluated, then COMPLETED, ERRORED or CANCELLED.

        Show 4 enum valuesHide 4 enum values
        • IN_PROGRESS
        • COMPLETED
        • ERRORED
        • CANCELLED
      • sourceenum

        How a test run was started: automated by a prompt action, experiment from a prompt experiment, or api through the API or an SDK.

        Show 3 enum valuesHide 3 enum values
        • automated
        • experiment
        • api
      • testsPassedinteger

        The number of test cases that passed.

      • testsFailedinteger

        The number of test cases that failed.

      • totalTestsinteger

        The total number of test cases in the test run.

      • runDurationnumber

        The total duration of the test run in seconds.

      • evaluationCostnumber | null

        The cost of evaluating the test run, if recorded.

      • datasetAliasstring | null

        The alias of the dataset the test run used, if any.

      • evaluatorCollectionNamestring | null

        The name of the evaluator collection the test run used, if any.

      • actionNamestring | null

        The name of the prompt action that started the test run, if it was started by one.

    • totalTestRunsinteger

      Total number of test runs of the commit matching the filters.

    • pageinteger

      The page this response covers.

    • pageSizeinteger

      The number of test runs per page.

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI