Retrieve an eval run trace
curl --request GET \
--url https://api.lightsage.com/v2/eval-runs/{run_id}/trace \
--header 'X-Lightsage-Api-Key: <api-key>'import requests
url = "https://api.lightsage.com/v2/eval-runs/{run_id}/trace"
headers = {"X-Lightsage-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Lightsage-Api-Key': '<api-key>'}};
fetch('https://api.lightsage.com/v2/eval-runs/{run_id}/trace', 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.lightsage.com/v2/eval-runs/{run_id}/trace",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Lightsage-Api-Key: <api-key>"
],
]);
$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.lightsage.com/v2/eval-runs/{run_id}/trace"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Lightsage-Api-Key", "<api-key>")
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.lightsage.com/v2/eval-runs/{run_id}/trace")
.header("X-Lightsage-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lightsage.com/v2/eval-runs/{run_id}/trace")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Lightsage-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"run_id": "<string>",
"status": "<string>",
"next_after_id": 1,
"has_more": true,
"progress": {
"total": 0,
"queued": 0,
"running": 0,
"completed": 0,
"failed": 0,
"cancelled": 0,
"retrying": 0,
"interrupted": 0,
"percent": 0
},
"error": "<string>",
"data": [
{
"run_id": "<string>",
"child_job_id": "<string>",
"event_id": 123,
"category": "<string>",
"type": "<string>",
"message": "<string>",
"eval_id": "<string>",
"eval_name": "<string>",
"configuration_id": "<string>",
"agent": "<string>",
"prompt_index": 0,
"repeat_index": 0,
"timestamp": "<string>",
"data": {}
}
]
}{
"detail": "Eval run not found. Use the run ID returned when you started the eval."
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Eval Runs
Retrieve an eval run trace
Returns a finite page of sanitized execution events for one eval run. Use next_after_id as after_id to retrieve the next page. Use the monitor operation instead when following a run live.
GET
/
v2
/
eval-runs
/
{run_id}
/
trace
Retrieve an eval run trace
curl --request GET \
--url https://api.lightsage.com/v2/eval-runs/{run_id}/trace \
--header 'X-Lightsage-Api-Key: <api-key>'import requests
url = "https://api.lightsage.com/v2/eval-runs/{run_id}/trace"
headers = {"X-Lightsage-Api-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Lightsage-Api-Key': '<api-key>'}};
fetch('https://api.lightsage.com/v2/eval-runs/{run_id}/trace', 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.lightsage.com/v2/eval-runs/{run_id}/trace",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"X-Lightsage-Api-Key: <api-key>"
],
]);
$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.lightsage.com/v2/eval-runs/{run_id}/trace"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Lightsage-Api-Key", "<api-key>")
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.lightsage.com/v2/eval-runs/{run_id}/trace")
.header("X-Lightsage-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lightsage.com/v2/eval-runs/{run_id}/trace")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Lightsage-Api-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"run_id": "<string>",
"status": "<string>",
"next_after_id": 1,
"has_more": true,
"progress": {
"total": 0,
"queued": 0,
"running": 0,
"completed": 0,
"failed": 0,
"cancelled": 0,
"retrying": 0,
"interrupted": 0,
"percent": 0
},
"error": "<string>",
"data": [
{
"run_id": "<string>",
"child_job_id": "<string>",
"event_id": 123,
"category": "<string>",
"type": "<string>",
"message": "<string>",
"eval_id": "<string>",
"eval_name": "<string>",
"configuration_id": "<string>",
"agent": "<string>",
"prompt_index": 0,
"repeat_index": 0,
"timestamp": "<string>",
"data": {}
}
]
}{
"detail": "Eval run not found. Use the run ID returned when you started the eval."
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Path Parameters
Query Parameters
Return events with IDs greater than this cursor.
Required range:
x >= 0Maximum number of trace events to return.
Required range:
1 <= x <= 1000Response
Successful Response
Cursor to pass as after_id when requesting the next page.
Required range:
x >= 0Show child attributes
Show child attributes
Show child attributes
Show child attributes