Submit Test Case Result
POSThttps://api.confident-ai.com/v1/test-runs/evaluate/{testCaseId}
Submit the result for a single test case in a long-running agent evaluation. Confident AI automatically evaluates the test case and finalizes the test run once every result has been received.
Long-running mode is available for single-turn AI connection evaluations only.
curl -X POST "https://api.confident-ai.com/v1/test-runs/evaluate/{testCaseId}" \
-H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
-H "Content-Type: application/json" \
-d '{
"actualOutput": "The capital of France is Paris."
}'{
"success": true,
"data": {
"testCaseId": "<TEST-CASE-ID>",
"status": "accepted"
}
}Headers
CONFIDENT_API_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
testCaseIdstringRequiredThe test case id Confident AI sent to your AI connection as
confident.testCaseIdwhen it dispatched this golden.
Request body
actualOutputstringThe actual output produced by your agent.
retrievalContextlist of stringsThe retrieval context your agent used, if any.
toolsCalledlist of objectsThe tools your agent called while producing the output.
Show 5 propertiesHide 5 properties
namestringRequiredThis is the name of the tool.
descriptionstringRequiredThis is the description of the tool.
inputParametersobjectThis is the input parameters that are passed to the tool.
outputstringThis is the output of the tool.
reasoningstringThis is the reasoning your LLM provided for the tool call.
expectedToolslist of objectsThe tools you expected to be called for this test case.
Show 5 propertiesHide 5 properties
namestringRequiredThis is the name of the tool.
descriptionstringRequiredThis is the description of the tool.
inputParametersobjectThis is the input parameters that are passed to the tool.
outputstringThis is the output of the tool.
reasoningstringThis is the reasoning your LLM provided for the tool call.
metadataobjectOptional additional metadata to attach to the test case.
Response
The result was accepted for evaluation.
successbooleanA boolean indicating the success or failure of the API call.
dataobjectThe recorded test case id and its status.
Show 2 propertiesHide 2 properties
testCaseIdstringThe test case id the result was recorded for.
statusenumacceptedwhen queued for evaluation;already_receivedon an idempotent retry.Show 2 enum valuesHide 2 enum values
acceptedalready_received