For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Trust CenterStatusSupportGet a demoPlatform
DocumentationEvals API ReferenceIntegrations & OTELPlatform SettingsSelf-HostingChangelog
DocumentationEvals API ReferenceIntegrations & OTELPlatform SettingsSelf-HostingChangelog
  • Get Started
    • Introduction
    • Quickstart
    • Authentication
    • Data Models
    • API Conventions
  • Metrics
    • GETList Metrics
    • POSTCreate Metrics
    • PUTUpdate Metrics
    • POSTBatch Create
  • Metric Collections
    • GETList Metric Collections
    • POSTAdd Collection
    • PUTUpdate Collection
  • Datasets
    • GETList Datasets
    • GETPull Dataset
    • POSTPush Dataset
    • DELDelete Dataset
  • Evaluation
    • POSTRun LLM Evals
    • POSTSimulate Conversation
    • POSTEvaluate Span
    • POSTEvaluate Trace
    • POSTEvaluate Thread
    • GETRetrieve Test Run
    • GETList Test Runs
  • Tracing
    • GETList Traces
    • POSTTrace Ingestion
    • GETRetrieve Trace
    • GETList Spans
    • GETRetrieve Span
  • Threads
    • GETList Threads
    • GETRetrieve Thread
  • Prompt
    • GETList Prompts
    • POSTPush Prompts
    • GETPull Prompts By Label
    • GETPull Prompts By Version
    • GETPull Prompts By Commit
    • GETList Versions
    • POSTCreate Version
    • GETList Commits
    • GETList Branches
    • POSTCreate Branch
    • PUTUpdate Branch
    • DELDelete Branch
  • Metric Data
    • GETList Metrics Data
  • Annotations
    • GETList Annotations
    • POSTCreate Annotation
    • GETGet Annotation
    • PUTUpdate Annotation
  • Annotation Queues
    • GETList Annotation Queues
    • POSTCreate Annotation Queue
    • GETGet Annotation Queue
    • DELDelete Annotation Queue
    • GETList Queue Items
    • POSTAnnotate Queue Item
  • Projects
    • GETList Projects
    • POSTCreate Project
    • PUTUpdate Project
LogoLogo
Trust CenterStatusSupportGet a demoPlatform
Evaluation

Retrieve Test Run

GET
https://api.confident-ai.com/v1/test-runs/:testRunId
GET
/v1/test-runs/:testRunId
$curl https://api.confident-ai.com/v1/test-runs/testRunId \
> -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>"
1{
2 "success": true,
3 "data": {
4 "metricsScores": [
5 {
6 "fails": 1,
7 "errors": 0,
8 "metric": "Answer Correctness",
9 "passes": 0,
10 "scores": [
11 0
12 ]
13 }
14 ],
15 "testCases": [
16 {
17 "id": "TEST-CASE-ID",
18 "name": "Test Case 1",
19 "input": "What's the capital of France?",
20 "actualOutput": "San Francisco",
21 "context": [
22 "The capital of France is Paris."
23 ],
24 "retrievalContext": [
25 "The capital of France is Paris."
26 ],
27 "expectedOutput": "Paris",
28 "metricsData": [
29 {
30 "id": "METRIC-ID",
31 "projectId": "string",
32 "name": "Answer Correctness",
33 "multiTurn": true,
34 "score": 0,
35 "reason": "The capital of France is Paris.",
36 "success": false,
37 "createdAt": "2024-01-15T09:30:00Z",
38 "threshold": 0.5,
39 "strictMode": false,
40 "skipped": true,
41 "evaluationModel": "gpt-4.1",
42 "evaluationCost": 0.001,
43 "verboseLogs": "..."
44 }
45 ],
46 "success": false,
47 "runDuration": 1.2,
48 "evaluationCost": 0.001
49 }
50 ],
51 "identifier": "test-run-001",
52 "status": "COMPLETED",
53 "testsPassed": 0,
54 "testsFailed": 1,
55 "totalTests": 1,
56 "runDuration": 1.5
57 },
58 "deprecated": false
59}
Retrieves a list of test cases and their respective metrics from a test run.
Was this page helpful?
Previous

List Test Runs

Next
Built with

Path parameters

testRunIdstringRequired
The id of the test run you want to retrieve.

Headers

CONFIDENT_API_KEYstringRequired
The API key of your Confident AI project.

Response

successboolean
This is true if the test run was successfully retrieved.
dataobject
deprecatedboolean
This is true if this endpoint is deprecated.