Python SDK
import decimalai
# get_eval_breakdown is a top-level SDK function.
breakdown = decimalai.get_eval_breakdown(
api_key="dai_sk_...",
trace_id="trc_abc123",
)
for group in breakdown["source_groups"]:
print(group["source_label"], group["source_avg"])curl --request GET \
--url https://api.decimal.ai/api/v1/traces/{trace_id}/eval-breakdown \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.decimal.ai/api/v1/traces/{trace_id}/eval-breakdown', 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://api.decimal.ai/api/v1/traces/{trace_id}/eval-breakdown",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.decimal.ai/api/v1/traces/{trace_id}/eval-breakdown"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.decimal.ai/api/v1/traces/{trace_id}/eval-breakdown")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.decimal.ai/api/v1/traces/{trace_id}/eval-breakdown")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"trace_id": "<string>",
"quality_avg": 123,
"compat_avg": 123,
"quality_scores": [
{
"id": "<string>",
"name": "<string>",
"score": 123,
"passed": true,
"source": "<string>",
"category": "<string>",
"reason": "<string>",
"source_label": "",
"icon": "",
"badge_color": "",
"change_type": "<string>",
"field_changes": {}
}
],
"compat_scores": [
{
"id": "<string>",
"name": "<string>",
"score": 123,
"passed": true,
"source": "<string>",
"category": "<string>",
"reason": "<string>",
"source_label": "",
"icon": "",
"badge_color": "",
"change_type": "<string>",
"field_changes": {}
}
],
"source_groups": [
{
"source": "<string>",
"source_label": "<string>",
"icon": "<string>",
"badge_color": "<string>",
"category": "<string>",
"scores": [
{
"id": "<string>",
"name": "<string>",
"score": 123,
"passed": true,
"source": "<string>",
"category": "<string>",
"reason": "<string>",
"source_label": "",
"icon": "",
"badge_color": "",
"change_type": "<string>",
"field_changes": {}
}
],
"source_avg": 123
}
],
"decision_reasons": [
"<string>"
],
"eval_verdict": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}eval-scores
Get full eval breakdown with provenance
Get the full eval breakdown for a trace, grouped by source.
Shows every score with its provenance (source label, icon, badge color), grouped into SourceGroups for the frontend to render section-by-section. Includes decision reasons explaining how the final verdict was determined.
GET
/
api
/
v1
/
traces
/
{trace_id}
/
eval-breakdown
Python SDK
import decimalai
# get_eval_breakdown is a top-level SDK function.
breakdown = decimalai.get_eval_breakdown(
api_key="dai_sk_...",
trace_id="trc_abc123",
)
for group in breakdown["source_groups"]:
print(group["source_label"], group["source_avg"])curl --request GET \
--url https://api.decimal.ai/api/v1/traces/{trace_id}/eval-breakdown \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.decimal.ai/api/v1/traces/{trace_id}/eval-breakdown', 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://api.decimal.ai/api/v1/traces/{trace_id}/eval-breakdown",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.decimal.ai/api/v1/traces/{trace_id}/eval-breakdown"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.decimal.ai/api/v1/traces/{trace_id}/eval-breakdown")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.decimal.ai/api/v1/traces/{trace_id}/eval-breakdown")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"trace_id": "<string>",
"quality_avg": 123,
"compat_avg": 123,
"quality_scores": [
{
"id": "<string>",
"name": "<string>",
"score": 123,
"passed": true,
"source": "<string>",
"category": "<string>",
"reason": "<string>",
"source_label": "",
"icon": "",
"badge_color": "",
"change_type": "<string>",
"field_changes": {}
}
],
"compat_scores": [
{
"id": "<string>",
"name": "<string>",
"score": 123,
"passed": true,
"source": "<string>",
"category": "<string>",
"reason": "<string>",
"source_label": "",
"icon": "",
"badge_color": "",
"change_type": "<string>",
"field_changes": {}
}
],
"source_groups": [
{
"source": "<string>",
"source_label": "<string>",
"icon": "<string>",
"badge_color": "<string>",
"category": "<string>",
"scores": [
{
"id": "<string>",
"name": "<string>",
"score": 123,
"passed": true,
"source": "<string>",
"category": "<string>",
"reason": "<string>",
"source_label": "",
"icon": "",
"badge_color": "",
"change_type": "<string>",
"field_changes": {}
}
],
"source_avg": 123
}
],
"decision_reasons": [
"<string>"
],
"eval_verdict": "<string>"
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Enter your API key (e.g. dai_sk_test_key_001)
Headers
Path Parameters
Cookies
Response
Successful Response
Full eval breakdown with provenance, for trace detail page.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
⌘I