Python SDK
import httpx
resp = httpx.get(
"https://api.decimal.ai/api/v1/traces/trc_abc123",
headers={"Authorization": "Bearer dai_sk_..."},
params={"include": "eval_scores"}, # optional
)
resp.raise_for_status()
trace = resp.json()decimalai traces show trc_abc123const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.decimal.ai/api/v1/traces/{trace_id}', 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}",
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}"
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}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.decimal.ai/api/v1/traces/{trace_id}")
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{
"id": "trc_abc123",
"agent_name": "travel-planner",
"status": "success",
"user_input": "Find flights to Tokyo",
"final_output": "I found 3 flights to Tokyo.",
"manifest_id": "mfst_001",
"eval_verdict": "keep",
"eval_score": 0.92,
"started_at": "2026-05-10T14:22:00Z",
"ended_at": "2026-05-10T14:22:01Z",
"duration_ms": 1240,
"total_tokens": 850,
"spans": [
{
"id": "s1",
"name": "agent-step",
"span_type": "agent",
"status": "success",
"started_at": "2026-05-10T14:22:00Z"
}
],
"llm_calls": [
{
"id": "l1",
"span_id": "s1",
"model_name": "gpt-4o",
"input_tokens": 500,
"output_tokens": 350
}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}traces
Get a trace
Get a single trace with its full span tree and LLM calls.
Pass ?include=eval_scores to embed the trace’s eval scores inline and
save a round-trip. Without that param the response omits them, and the
scores are available on their own at GET /traces//eval-scores.
GET
/
api
/
v1
/
traces
/
{trace_id}
Python SDK
import httpx
resp = httpx.get(
"https://api.decimal.ai/api/v1/traces/trc_abc123",
headers={"Authorization": "Bearer dai_sk_..."},
params={"include": "eval_scores"}, # optional
)
resp.raise_for_status()
trace = resp.json()decimalai traces show trc_abc123const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.decimal.ai/api/v1/traces/{trace_id}', 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}",
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}"
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}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.decimal.ai/api/v1/traces/{trace_id}")
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{
"id": "trc_abc123",
"agent_name": "travel-planner",
"status": "success",
"user_input": "Find flights to Tokyo",
"final_output": "I found 3 flights to Tokyo.",
"manifest_id": "mfst_001",
"eval_verdict": "keep",
"eval_score": 0.92,
"started_at": "2026-05-10T14:22:00Z",
"ended_at": "2026-05-10T14:22:01Z",
"duration_ms": 1240,
"total_tokens": 850,
"spans": [
{
"id": "s1",
"name": "agent-step",
"span_type": "agent",
"status": "success",
"started_at": "2026-05-10T14:22:00Z"
}
],
"llm_calls": [
{
"id": "l1",
"span_id": "s1",
"model_name": "gpt-4o",
"input_tokens": 500,
"output_tokens": 350
}
]
}{
"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
Query Parameters
Comma-separated extras: eval_scores
Cookies
Response
Successful Response
The response is of type Response Get Trace Api V1 Traces Trace Id Get · object.
⌘I