curl --request POST \
--url https://app.traceroot.ai/api/v1/public/evaluation-runs/{run_id}/results \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": "<string>",
"test_case_id": "<string>",
"baseline_output": "<string>",
"candidate_output": "<string>",
"cost": 1,
"duration_ms": 4503599627370495,
"expected_output": "<string>",
"scores": [
{
"scorer_name": "<string>",
"scorer_version": "<string>",
"bool_value": true,
"error": "<string>",
"explanation": "<string>",
"numeric_value": 123,
"passed": true,
"string_value": "<string>"
}
],
"task_error": "<string>",
"trace_id": "<string>"
}
'import requests
url = "https://app.traceroot.ai/api/v1/public/evaluation-runs/{run_id}/results"
payload = {
"input": "<string>",
"test_case_id": "<string>",
"baseline_output": "<string>",
"candidate_output": "<string>",
"cost": 1,
"duration_ms": 4503599627370495,
"expected_output": "<string>",
"scores": [
{
"scorer_name": "<string>",
"scorer_version": "<string>",
"bool_value": True,
"error": "<string>",
"explanation": "<string>",
"numeric_value": 123,
"passed": True,
"string_value": "<string>"
}
],
"task_error": "<string>",
"trace_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
input: '<string>',
test_case_id: '<string>',
baseline_output: '<string>',
candidate_output: '<string>',
cost: 1,
duration_ms: 4503599627370495,
expected_output: '<string>',
scores: [
{
scorer_name: '<string>',
scorer_version: '<string>',
bool_value: true,
error: '<string>',
explanation: '<string>',
numeric_value: 123,
passed: true,
string_value: '<string>'
}
],
task_error: '<string>',
trace_id: '<string>'
})
};
fetch('https://app.traceroot.ai/api/v1/public/evaluation-runs/{run_id}/results', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.traceroot.ai/api/v1/public/evaluation-runs/{run_id}/results",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'input' => '<string>',
'test_case_id' => '<string>',
'baseline_output' => '<string>',
'candidate_output' => '<string>',
'cost' => 1,
'duration_ms' => 4503599627370495,
'expected_output' => '<string>',
'scores' => [
[
'scorer_name' => '<string>',
'scorer_version' => '<string>',
'bool_value' => true,
'error' => '<string>',
'explanation' => '<string>',
'numeric_value' => 123,
'passed' => true,
'string_value' => '<string>'
]
],
'task_error' => '<string>',
'trace_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.traceroot.ai/api/v1/public/evaluation-runs/{run_id}/results"
payload := strings.NewReader("{\n \"input\": \"<string>\",\n \"test_case_id\": \"<string>\",\n \"baseline_output\": \"<string>\",\n \"candidate_output\": \"<string>\",\n \"cost\": 1,\n \"duration_ms\": 4503599627370495,\n \"expected_output\": \"<string>\",\n \"scores\": [\n {\n \"scorer_name\": \"<string>\",\n \"scorer_version\": \"<string>\",\n \"bool_value\": true,\n \"error\": \"<string>\",\n \"explanation\": \"<string>\",\n \"numeric_value\": 123,\n \"passed\": true,\n \"string_value\": \"<string>\"\n }\n ],\n \"task_error\": \"<string>\",\n \"trace_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.traceroot.ai/api/v1/public/evaluation-runs/{run_id}/results")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"input\": \"<string>\",\n \"test_case_id\": \"<string>\",\n \"baseline_output\": \"<string>\",\n \"candidate_output\": \"<string>\",\n \"cost\": 1,\n \"duration_ms\": 4503599627370495,\n \"expected_output\": \"<string>\",\n \"scores\": [\n {\n \"scorer_name\": \"<string>\",\n \"scorer_version\": \"<string>\",\n \"bool_value\": true,\n \"error\": \"<string>\",\n \"explanation\": \"<string>\",\n \"numeric_value\": 123,\n \"passed\": true,\n \"string_value\": \"<string>\"\n }\n ],\n \"task_error\": \"<string>\",\n \"trace_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.traceroot.ai/api/v1/public/evaluation-runs/{run_id}/results")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"input\": \"<string>\",\n \"test_case_id\": \"<string>\",\n \"baseline_output\": \"<string>\",\n \"candidate_output\": \"<string>\",\n \"cost\": 1,\n \"duration_ms\": 4503599627370495,\n \"expected_output\": \"<string>\",\n \"scores\": [\n {\n \"scorer_name\": \"<string>\",\n \"scorer_version\": \"<string>\",\n \"bool_value\": true,\n \"error\": \"<string>\",\n \"explanation\": \"<string>\",\n \"numeric_value\": 123,\n \"passed\": true,\n \"string_value\": \"<string>\"\n }\n ],\n \"task_error\": \"<string>\",\n \"trace_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"evaluation_result_id": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Upsert one test-case result with scores
Upsert one test-case result (and its scores). Idempotent on (run, test case).
curl --request POST \
--url https://app.traceroot.ai/api/v1/public/evaluation-runs/{run_id}/results \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"input": "<string>",
"test_case_id": "<string>",
"baseline_output": "<string>",
"candidate_output": "<string>",
"cost": 1,
"duration_ms": 4503599627370495,
"expected_output": "<string>",
"scores": [
{
"scorer_name": "<string>",
"scorer_version": "<string>",
"bool_value": true,
"error": "<string>",
"explanation": "<string>",
"numeric_value": 123,
"passed": true,
"string_value": "<string>"
}
],
"task_error": "<string>",
"trace_id": "<string>"
}
'import requests
url = "https://app.traceroot.ai/api/v1/public/evaluation-runs/{run_id}/results"
payload = {
"input": "<string>",
"test_case_id": "<string>",
"baseline_output": "<string>",
"candidate_output": "<string>",
"cost": 1,
"duration_ms": 4503599627370495,
"expected_output": "<string>",
"scores": [
{
"scorer_name": "<string>",
"scorer_version": "<string>",
"bool_value": True,
"error": "<string>",
"explanation": "<string>",
"numeric_value": 123,
"passed": True,
"string_value": "<string>"
}
],
"task_error": "<string>",
"trace_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
input: '<string>',
test_case_id: '<string>',
baseline_output: '<string>',
candidate_output: '<string>',
cost: 1,
duration_ms: 4503599627370495,
expected_output: '<string>',
scores: [
{
scorer_name: '<string>',
scorer_version: '<string>',
bool_value: true,
error: '<string>',
explanation: '<string>',
numeric_value: 123,
passed: true,
string_value: '<string>'
}
],
task_error: '<string>',
trace_id: '<string>'
})
};
fetch('https://app.traceroot.ai/api/v1/public/evaluation-runs/{run_id}/results', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.traceroot.ai/api/v1/public/evaluation-runs/{run_id}/results",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'input' => '<string>',
'test_case_id' => '<string>',
'baseline_output' => '<string>',
'candidate_output' => '<string>',
'cost' => 1,
'duration_ms' => 4503599627370495,
'expected_output' => '<string>',
'scores' => [
[
'scorer_name' => '<string>',
'scorer_version' => '<string>',
'bool_value' => true,
'error' => '<string>',
'explanation' => '<string>',
'numeric_value' => 123,
'passed' => true,
'string_value' => '<string>'
]
],
'task_error' => '<string>',
'trace_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.traceroot.ai/api/v1/public/evaluation-runs/{run_id}/results"
payload := strings.NewReader("{\n \"input\": \"<string>\",\n \"test_case_id\": \"<string>\",\n \"baseline_output\": \"<string>\",\n \"candidate_output\": \"<string>\",\n \"cost\": 1,\n \"duration_ms\": 4503599627370495,\n \"expected_output\": \"<string>\",\n \"scores\": [\n {\n \"scorer_name\": \"<string>\",\n \"scorer_version\": \"<string>\",\n \"bool_value\": true,\n \"error\": \"<string>\",\n \"explanation\": \"<string>\",\n \"numeric_value\": 123,\n \"passed\": true,\n \"string_value\": \"<string>\"\n }\n ],\n \"task_error\": \"<string>\",\n \"trace_id\": \"<string>\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://app.traceroot.ai/api/v1/public/evaluation-runs/{run_id}/results")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"input\": \"<string>\",\n \"test_case_id\": \"<string>\",\n \"baseline_output\": \"<string>\",\n \"candidate_output\": \"<string>\",\n \"cost\": 1,\n \"duration_ms\": 4503599627370495,\n \"expected_output\": \"<string>\",\n \"scores\": [\n {\n \"scorer_name\": \"<string>\",\n \"scorer_version\": \"<string>\",\n \"bool_value\": true,\n \"error\": \"<string>\",\n \"explanation\": \"<string>\",\n \"numeric_value\": 123,\n \"passed\": true,\n \"string_value\": \"<string>\"\n }\n ],\n \"task_error\": \"<string>\",\n \"trace_id\": \"<string>\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.traceroot.ai/api/v1/public/evaluation-runs/{run_id}/results")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"input\": \"<string>\",\n \"test_case_id\": \"<string>\",\n \"baseline_output\": \"<string>\",\n \"candidate_output\": \"<string>\",\n \"cost\": 1,\n \"duration_ms\": 4503599627370495,\n \"expected_output\": \"<string>\",\n \"scores\": [\n {\n \"scorer_name\": \"<string>\",\n \"scorer_version\": \"<string>\",\n \"bool_value\": true,\n \"error\": \"<string>\",\n \"explanation\": \"<string>\",\n \"numeric_value\": 123,\n \"passed\": true,\n \"string_value\": \"<string>\"\n }\n ],\n \"task_error\": \"<string>\",\n \"trace_id\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"evaluation_result_id": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
Upsert one test-case result. Idempotent on (run_id, test_case_id).
trace_id may be null now and set on a later call (out-of-order arrival).
scores is genuinely optional and carries three distinct meanings, so the
out-of-order flow (POST the result with its scores, then re-POST later just to
attach the OTel trace_id) cannot destroy them: absent → leave the existing
scores untouched, [] → clear them, non-empty → replace them. Do not give
this a default_factory=list, which would collapse the first two cases.
Every optional field is a partial update: a key the caller omits keeps its
stored value, while an explicit null clears it. Sending scores replaces
the result's scores ([] clears them); omitting it leaves them alone.
1000000passed, failed, errored, not_scored 1 - 6410000001000000improved, regressed, unchanged x >= 00 <= x <= 90071992547409911000000200Show child attributes
Show child attributes
100001 - 64Response
Successful Response

