Complete/finalize an evaluation run
curl --request POST \
--url https://app.traceroot.ai/api/v1/public/evaluation-runs/{run_id}/complete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"case_count": 4503599627370495,
"scored_count": 4503599627370495,
"scorer_error_count": 4503599627370495,
"scorers": [
{
"name": "<string>",
"version": "<string>",
"description": "<string>",
"emitted_metrics": [
{
"name": "<string>",
"threshold": 123
}
],
"key": "<string>",
"messages": [
{
"content": "<string>",
"role": "<string>"
}
],
"metadata": null,
"model": "<string>",
"required_inputs": [
"<string>"
],
"source": "<string>",
"threshold": 123
}
],
"task_error_count": 4503599627370495
}
'import requests
url = "https://app.traceroot.ai/api/v1/public/evaluation-runs/{run_id}/complete"
payload = {
"case_count": 4503599627370495,
"scored_count": 4503599627370495,
"scorer_error_count": 4503599627370495,
"scorers": [
{
"name": "<string>",
"version": "<string>",
"description": "<string>",
"emitted_metrics": [
{
"name": "<string>",
"threshold": 123
}
],
"key": "<string>",
"messages": [
{
"content": "<string>",
"role": "<string>"
}
],
"metadata": None,
"model": "<string>",
"required_inputs": ["<string>"],
"source": "<string>",
"threshold": 123
}
],
"task_error_count": 4503599627370495
}
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({
case_count: 4503599627370495,
scored_count: 4503599627370495,
scorer_error_count: 4503599627370495,
scorers: [
{
name: '<string>',
version: '<string>',
description: '<string>',
emitted_metrics: [{name: '<string>', threshold: 123}],
key: '<string>',
messages: [{content: '<string>', role: '<string>'}],
metadata: null,
model: '<string>',
required_inputs: ['<string>'],
source: '<string>',
threshold: 123
}
],
task_error_count: 4503599627370495
})
};
fetch('https://app.traceroot.ai/api/v1/public/evaluation-runs/{run_id}/complete', 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}/complete",
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([
'case_count' => 4503599627370495,
'scored_count' => 4503599627370495,
'scorer_error_count' => 4503599627370495,
'scorers' => [
[
'name' => '<string>',
'version' => '<string>',
'description' => '<string>',
'emitted_metrics' => [
[
'name' => '<string>',
'threshold' => 123
]
],
'key' => '<string>',
'messages' => [
[
'content' => '<string>',
'role' => '<string>'
]
],
'metadata' => null,
'model' => '<string>',
'required_inputs' => [
'<string>'
],
'source' => '<string>',
'threshold' => 123
]
],
'task_error_count' => 4503599627370495
]),
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}/complete"
payload := strings.NewReader("{\n \"case_count\": 4503599627370495,\n \"scored_count\": 4503599627370495,\n \"scorer_error_count\": 4503599627370495,\n \"scorers\": [\n {\n \"name\": \"<string>\",\n \"version\": \"<string>\",\n \"description\": \"<string>\",\n \"emitted_metrics\": [\n {\n \"name\": \"<string>\",\n \"threshold\": 123\n }\n ],\n \"key\": \"<string>\",\n \"messages\": [\n {\n \"content\": \"<string>\",\n \"role\": \"<string>\"\n }\n ],\n \"metadata\": null,\n \"model\": \"<string>\",\n \"required_inputs\": [\n \"<string>\"\n ],\n \"source\": \"<string>\",\n \"threshold\": 123\n }\n ],\n \"task_error_count\": 4503599627370495\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}/complete")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"case_count\": 4503599627370495,\n \"scored_count\": 4503599627370495,\n \"scorer_error_count\": 4503599627370495,\n \"scorers\": [\n {\n \"name\": \"<string>\",\n \"version\": \"<string>\",\n \"description\": \"<string>\",\n \"emitted_metrics\": [\n {\n \"name\": \"<string>\",\n \"threshold\": 123\n }\n ],\n \"key\": \"<string>\",\n \"messages\": [\n {\n \"content\": \"<string>\",\n \"role\": \"<string>\"\n }\n ],\n \"metadata\": null,\n \"model\": \"<string>\",\n \"required_inputs\": [\n \"<string>\"\n ],\n \"source\": \"<string>\",\n \"threshold\": 123\n }\n ],\n \"task_error_count\": 4503599627370495\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.traceroot.ai/api/v1/public/evaluation-runs/{run_id}/complete")
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 \"case_count\": 4503599627370495,\n \"scored_count\": 4503599627370495,\n \"scorer_error_count\": 4503599627370495,\n \"scorers\": [\n {\n \"name\": \"<string>\",\n \"version\": \"<string>\",\n \"description\": \"<string>\",\n \"emitted_metrics\": [\n {\n \"name\": \"<string>\",\n \"threshold\": 123\n }\n ],\n \"key\": \"<string>\",\n \"messages\": [\n {\n \"content\": \"<string>\",\n \"role\": \"<string>\"\n }\n ],\n \"metadata\": null,\n \"model\": \"<string>\",\n \"required_inputs\": [\n \"<string>\"\n ],\n \"source\": \"<string>\",\n \"threshold\": 123\n }\n ],\n \"task_error_count\": 4503599627370495\n}"
response = http.request(request)
puts response.read_body{
"evaluation_run_id": "<string>",
"status": "running"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Offline Eval
Complete/finalize an evaluation run
Complete/fail a run, reporting final completeness counts.
POST
/
api
/
v1
/
public
/
evaluation-runs
/
{run_id}
/
complete
Complete/finalize an evaluation run
curl --request POST \
--url https://app.traceroot.ai/api/v1/public/evaluation-runs/{run_id}/complete \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"case_count": 4503599627370495,
"scored_count": 4503599627370495,
"scorer_error_count": 4503599627370495,
"scorers": [
{
"name": "<string>",
"version": "<string>",
"description": "<string>",
"emitted_metrics": [
{
"name": "<string>",
"threshold": 123
}
],
"key": "<string>",
"messages": [
{
"content": "<string>",
"role": "<string>"
}
],
"metadata": null,
"model": "<string>",
"required_inputs": [
"<string>"
],
"source": "<string>",
"threshold": 123
}
],
"task_error_count": 4503599627370495
}
'import requests
url = "https://app.traceroot.ai/api/v1/public/evaluation-runs/{run_id}/complete"
payload = {
"case_count": 4503599627370495,
"scored_count": 4503599627370495,
"scorer_error_count": 4503599627370495,
"scorers": [
{
"name": "<string>",
"version": "<string>",
"description": "<string>",
"emitted_metrics": [
{
"name": "<string>",
"threshold": 123
}
],
"key": "<string>",
"messages": [
{
"content": "<string>",
"role": "<string>"
}
],
"metadata": None,
"model": "<string>",
"required_inputs": ["<string>"],
"source": "<string>",
"threshold": 123
}
],
"task_error_count": 4503599627370495
}
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({
case_count: 4503599627370495,
scored_count: 4503599627370495,
scorer_error_count: 4503599627370495,
scorers: [
{
name: '<string>',
version: '<string>',
description: '<string>',
emitted_metrics: [{name: '<string>', threshold: 123}],
key: '<string>',
messages: [{content: '<string>', role: '<string>'}],
metadata: null,
model: '<string>',
required_inputs: ['<string>'],
source: '<string>',
threshold: 123
}
],
task_error_count: 4503599627370495
})
};
fetch('https://app.traceroot.ai/api/v1/public/evaluation-runs/{run_id}/complete', 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}/complete",
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([
'case_count' => 4503599627370495,
'scored_count' => 4503599627370495,
'scorer_error_count' => 4503599627370495,
'scorers' => [
[
'name' => '<string>',
'version' => '<string>',
'description' => '<string>',
'emitted_metrics' => [
[
'name' => '<string>',
'threshold' => 123
]
],
'key' => '<string>',
'messages' => [
[
'content' => '<string>',
'role' => '<string>'
]
],
'metadata' => null,
'model' => '<string>',
'required_inputs' => [
'<string>'
],
'source' => '<string>',
'threshold' => 123
]
],
'task_error_count' => 4503599627370495
]),
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}/complete"
payload := strings.NewReader("{\n \"case_count\": 4503599627370495,\n \"scored_count\": 4503599627370495,\n \"scorer_error_count\": 4503599627370495,\n \"scorers\": [\n {\n \"name\": \"<string>\",\n \"version\": \"<string>\",\n \"description\": \"<string>\",\n \"emitted_metrics\": [\n {\n \"name\": \"<string>\",\n \"threshold\": 123\n }\n ],\n \"key\": \"<string>\",\n \"messages\": [\n {\n \"content\": \"<string>\",\n \"role\": \"<string>\"\n }\n ],\n \"metadata\": null,\n \"model\": \"<string>\",\n \"required_inputs\": [\n \"<string>\"\n ],\n \"source\": \"<string>\",\n \"threshold\": 123\n }\n ],\n \"task_error_count\": 4503599627370495\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}/complete")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"case_count\": 4503599627370495,\n \"scored_count\": 4503599627370495,\n \"scorer_error_count\": 4503599627370495,\n \"scorers\": [\n {\n \"name\": \"<string>\",\n \"version\": \"<string>\",\n \"description\": \"<string>\",\n \"emitted_metrics\": [\n {\n \"name\": \"<string>\",\n \"threshold\": 123\n }\n ],\n \"key\": \"<string>\",\n \"messages\": [\n {\n \"content\": \"<string>\",\n \"role\": \"<string>\"\n }\n ],\n \"metadata\": null,\n \"model\": \"<string>\",\n \"required_inputs\": [\n \"<string>\"\n ],\n \"source\": \"<string>\",\n \"threshold\": 123\n }\n ],\n \"task_error_count\": 4503599627370495\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.traceroot.ai/api/v1/public/evaluation-runs/{run_id}/complete")
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 \"case_count\": 4503599627370495,\n \"scored_count\": 4503599627370495,\n \"scorer_error_count\": 4503599627370495,\n \"scorers\": [\n {\n \"name\": \"<string>\",\n \"version\": \"<string>\",\n \"description\": \"<string>\",\n \"emitted_metrics\": [\n {\n \"name\": \"<string>\",\n \"threshold\": 123\n }\n ],\n \"key\": \"<string>\",\n \"messages\": [\n {\n \"content\": \"<string>\",\n \"role\": \"<string>\"\n }\n ],\n \"metadata\": null,\n \"model\": \"<string>\",\n \"required_inputs\": [\n \"<string>\"\n ],\n \"source\": \"<string>\",\n \"threshold\": 123\n }\n ],\n \"task_error_count\": 4503599627370495\n}"
response = http.request(request)
puts response.read_body{
"evaluation_run_id": "<string>",
"status": "running"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}The TraceRoot SDKs call this endpoint for you; call it directly only where no SDK fits. It accepts a project API key only.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Complete/fail a run, reporting final completeness counts.
Available options:
running, completed, completed_with_errors, failed, incomplete, cancelled Required range:
0 <= x <= 9007199254740991Required range:
0 <= x <= 9007199254740991Required range:
0 <= x <= 9007199254740991Maximum array length:
200Show child attributes
Show child attributes
Required range:
0 <= x <= 9007199254740991
