List Data
GEThttps://api.confident-ai.com/v2/metrics-data
Lists the metric results in your Confident AI project one page at a time. Only results recorded against single-turn test cases are listed; multi-turn results are read through the test run they belong to.
curl -X GET "https://api.confident-ai.com/v2/metrics-data" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"{
"success": true,
"data": {
"metricsData": [
{
"id": "<METRIC-DATA-ID>",
"name": "Answer Relevancy",
"score": 0.95,
"reason": "The answer directly states the capital of France.",
"success": true,
"threshold": 0.5,
"strictMode": false,
"skipped": false,
"flaky": false,
"evaluationModel": "gpt-4o",
"evaluationCost": 0.0004,
"error": null,
"errorType": "AI_CONNECTION_ERROR",
"createdAt": "2025-01-15T10:30:06.000Z",
"evaluatedAt": "2025-01-15T10:30:09.000Z",
"multiTurn": false
}
],
"totalMetricsData": 120,
"page": 1,
"pageSize": 25
},
"deprecated": false
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Query parameters
pageintegerdefault: 1The page of metric data to return. Defaults to 1.
pageSizeintegerdefault: 25The number of results per page, at most 100. Defaults to 25.
startstringReturns only results recorded at or after this ISO 8601 datetime.
endstringReturns only results recorded before this ISO 8601 datetime.
Response
List Data succeeded.
successbooleanIndicates if the request was successful.
dataobjectOne page of metric results, with the total across all pages.
Show 4 propertiesHide 4 properties
metricsDatalist of objectsThe metric results for the current page. Only single-turn results are listed.
Show 16 propertiesHide 16 properties
idstringThe unique identifier of the metric data entry.
namestringThe name of the metric.
scorenumber | nullThe final metric score, or null when the metric errored or was skipped.
reasonstring | nullThe reason for the metric score, generated by the evaluation model at evaluation time.
successboolean | nullWhether the metric score is above the threshold, or null while the evaluation is still running.
thresholdnumber | nullThe threshold for the metric, which determines if the metric is passing or failing.
strictModebooleanWhether the metric was run in strict mode, which outputs a binary score of 0 or 1.
skippedbooleanWhether the metric evaluation was skipped.
flakybooleanWhether the metric's verdict was non-deterministic across runs.
evaluationModelstring | nullThe evaluation model used to run the evaluation.
evaluationCostnumber | nullThe cost of running the evaluation in USD.
errorstring | nullThe error message if the evaluation failed.
errorTypeenum | nullWhy an evaluation errored: the AI connection or a transformer failed, the evaluation model failed, the test case lacked the parameters the metric needs, or an internal error occurred.
Show 5 enum valuesHide 5 enum values
AI_CONNECTION_ERRORTRANSFORMER_ERROREVALUATION_MODEL_ERRORINVALID_TEST_CASE_PARAMETERSINTERNAL_ERROR
createdAtstringThe time the metric data was created.
evaluatedAtstring | nullThe time the metric was evaluated, or null while it is still running.
multiTurnbooleanWhether this metric was evaluated on a multi-turn conversation.
totalMetricsDataintegerThe total number of single-turn results matching the query across all pages.
pageintegerThe page this response covers.
pageSizeintegerThe number of results per page.
deprecatedbooleanIndicates if this endpoint is deprecated.