curl --request GET \
--url https://dev.api.galtea.ai/traces/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://dev.api.galtea.ai/traces/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://dev.api.galtea.ai/traces/{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://dev.api.galtea.ai/traces/{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://dev.api.galtea.ai/traces/{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://dev.api.galtea.ai/traces/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.api.galtea.ai/traces/{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": "trace_123",
"inferenceResultId": "ir_123",
"name": "fetch_user_data",
"type": "TOOL",
"description": "Fetches user data from the database by ID",
"inputData": {
"user_id": "123"
},
"outputData": {
"name": "John Doe",
"email": "john@example.com"
},
"error": "Connection timeout",
"latencyMs": 45.5,
"metadata": {
"model": "gpt-4",
"temperature": 0.7
},
"parentTraceId": "trace_parent_123",
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z",
"modelId": "model_123",
"modelName": "gpt-4o-mini",
"inputTokens": 100,
"outputTokens": 50,
"cacheReadInputTokens": 20,
"tokens": 170,
"costPerInputToken": 0.00001,
"costPerOutputToken": 0.00003,
"costPerCacheReadInputToken": 0.000005,
"cost": 0.0026
}{
"error": "NotFound",
"message": "Product not found"
}{
"error": "NotFound",
"message": "Product not found"
}Get span by ID
Get a specific span by its ID. See Spans. These endpoints serve spans, the steps inside a trace. Their REST path /traces keeps the old name of this entity.
curl --request GET \
--url https://dev.api.galtea.ai/traces/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://dev.api.galtea.ai/traces/{id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://dev.api.galtea.ai/traces/{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://dev.api.galtea.ai/traces/{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://dev.api.galtea.ai/traces/{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://dev.api.galtea.ai/traces/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.api.galtea.ai/traces/{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": "trace_123",
"inferenceResultId": "ir_123",
"name": "fetch_user_data",
"type": "TOOL",
"description": "Fetches user data from the database by ID",
"inputData": {
"user_id": "123"
},
"outputData": {
"name": "John Doe",
"email": "john@example.com"
},
"error": "Connection timeout",
"latencyMs": 45.5,
"metadata": {
"model": "gpt-4",
"temperature": 0.7
},
"parentTraceId": "trace_parent_123",
"startTime": "2023-11-07T05:31:56Z",
"endTime": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"deletedAt": "2023-11-07T05:31:56Z",
"modelId": "model_123",
"modelName": "gpt-4o-mini",
"inputTokens": 100,
"outputTokens": 50,
"cacheReadInputTokens": 20,
"tokens": 170,
"costPerInputToken": 0.00001,
"costPerOutputToken": 0.00003,
"costPerCacheReadInputToken": 0.000005,
"cost": 0.0026
}{
"error": "NotFound",
"message": "Product not found"
}{
"error": "NotFound",
"message": "Product not found"
}Authorizations
API key authorization. Pass your API key in the Authorization header as a Bearer token. Both new (gsk_*) and legacy (gsk-) API keys are accepted, e.g. Authorization: Bearer gsk_... or Authorization: Bearer gsk-....
Path Parameters
Span ID
Response
Span retrieved successfully
A span: one step inside a trace, such as a tool call, a retrieval or an LLM call. The schema name and the /traces path still carry the old name of this entity, "trace". The parent trace is inferenceResultId; the parentTraceId field is the parent span, not the trace. Span ids start with trace_, so a trace_ id belongs here and never to a trace.
"trace_123"
"ir_123"
"fetch_user_data"
SPAN, GENERATION, EVENT, AGENT, TOOL, CHAIN, RETRIEVER, EVALUATOR, EMBEDDING, GUARDRAIL "TOOL"
Human-readable description of the operation. Maximum 1MB.
"Fetches user data from the database by ID"
Input parameters passed to the operation
{ "user_id": "123" }
Result returned by the operation. Usually an object; a plain string for retrieval-context spans
{
"name": "John Doe",
"email": "john@example.com"
}
Error message if failed
"Connection timeout"
Execution time in milliseconds
45.5
Additional custom metadata
{ "model": "gpt-4", "temperature": 0.7 }
ID of parent span for hierarchical relationships
"trace_parent_123"
The model that answered this LLM call, found by name when the span was ingested. Galtea tries the response model name, then the request model name, each through the model name rule: the name itself, then without its provider prefix, then without a trailing date, then with a provider prefix added. From 2026-11-19 the last two steps exist: a name with a date, or with no provider prefix, links a model where it linked none (a span named 'mistral-small-2603' links 'mistral/mistral-small-2603'). From 2026-11-19 too, the response model name goes through every step before the request model name is tried (a span with response 'openai/gpt-4o' and request 'gpt-4o-mini' links 'gpt-4o'), and a span whose metadata holds a request model name but no span model name (a span that did not come from OTLP) is looked up by it. Null when no live model of the organization, or global model, matched. Deleting the model keeps it, so it can name a deleted model.
"model_123"
The model name the span reported, whether or not it matched a model.
"gpt-4o-mini"
Input tokens the LLM call reported, cached input included. Null without evaluation.readInference on the product.
100
Output tokens the LLM call reported. Null without evaluation.readInference on the product.
50
Input tokens the LLM call read from the cache, a part of inputTokens priced at the cache-read rate. A count above inputTokens is taken as counted apart and flagged in the metadata. Null without evaluation.readInference on the product.
20
Sum of the input and output tokens, so cached input counts once, plus the cache read when the source counted it apart from the input. Null without evaluation.readInference on the product.
170
Price of one input token, frozen at ingest from the model of this call, or from the version model when the span names no model. From 2026-11-19 a span whose metadata holds a request model name but no span model name (a span that did not come from OTLP) is priced at the model that name links, and keeps the version model when it links none. Null when the model name of the span links to nothing (an OTLP span takes its model name from the response model, else the request model), or the model has no price. Null without evaluation.readInference on the product.
0.00001
Price of one output token, frozen at ingest like costPerInputToken. Null without evaluation.readInference on the product.
0.00003
Price of one cache-read token, frozen at ingest like costPerInputToken. Null without evaluation.readInference on the product.
0.000005
Cost of this call at the frozen rates. Null when no rates were found. A turn's cost sums the costs of the spans it counts. A call counts once for each side, input and output, from the deepest span that reports it. Two sibling spans that report the same call both count, as a Mistral SDK span and its llm_call_details event do. A span that loses one side to a span below is priced again for the side it keeps. Null without evaluation.readInference on the product.
0.0026