Retrieve an eval run
curl --request GET \
--url https://api.lightsage.com/v2/eval-runs/{run_id} \
--header 'X-Lightsage-Api-Key: <api-key>'import requests
url = "https://api.lightsage.com/v2/eval-runs/{run_id}"
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}', 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}",
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}"
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}")
.header("X-Lightsage-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lightsage.com/v2/eval-runs/{run_id}")
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{
"id": "<string>",
"job_id": "<string>",
"status": "<string>",
"eval_id": "<string>",
"eval_name": "<string>",
"configuration_id": "<string>",
"persona": "<string>",
"agent": [
"<string>"
],
"prompt_count": 1,
"runs": 1,
"attempt_count": 1,
"stage": "<string>",
"dispatch_id": "<string>",
"progress": {
"total": 0,
"queued": 0,
"running": 0,
"completed": 0,
"failed": 0,
"cancelled": 0,
"retrying": 0,
"interrupted": 0,
"percent": 0
},
"estimated_cost": 123,
"error": "<string>",
"created_at": "<string>",
"started_at": "<string>",
"completed_at": "<string>",
"results": [
{
"id": "<string>",
"eval_id": "<string>",
"agent": "<string>",
"agent_version": "<string>",
"prompt": "<string>",
"prompt_index": 0,
"repeat_index": 0,
"passed": true,
"score": 123,
"failure_reasons": [
"<string>"
],
"grader_results": [
{
"name": "<string>",
"label": "<string>",
"passed": true,
"score": 123,
"deductions": [
"<string>"
],
"details": "<string>",
"criteria_verdicts": [
{
"criterion": "<string>",
"verdict": "PASS",
"evidence": "<string>"
}
],
"not_applicable": false
}
],
"preference_result": {
"outcome": "won",
"winner_name": "<string>",
"competitor_name": "<string>",
"competitor_domain": "<string>"
},
"latency_ms": 123,
"tool_calls": [
{
"timing_basis": "timed_by_agent",
"tool_call_id": "<string>",
"tool_name": "<string>",
"duration_ms": 1,
"started_at": "<string>",
"completed_at": "<string>"
}
],
"search_grounding": "disabled",
"web_retrieval_observed": true,
"search_observed": true,
"grounding_qualified": true,
"grounding_qualification_reason": "<string>",
"created_at": "<string>",
"environment": {
"id": "<string>",
"name": "<string>",
"updated_at": "<string>",
"queued_at": "<string>",
"variable_names": [
"<string>"
],
"inline": false,
"changed_since_queued": true
},
"setup_output": [
{
"command": "<string>",
"exit_code": 123,
"status": "<string>",
"output": "<string>",
"output_truncated": false
}
]
}
],
"analysis": [
{
"id": "<string>",
"result_id": "<string>",
"attempt_id": "<string>",
"eval_id": "<string>",
"agent": "<string>",
"prompt": "<string>",
"prompt_index": 0,
"variant_key": "default",
"repeat_index": 0,
"analysis_version": "<string>",
"analysis": {},
"created_at": "<string>",
"updated_at": "<string>"
}
],
"results_truncated": false
}{
"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
Returns the run’s current status and progress. Once its attempts finish, the response also includes their results and analysis. Poll this until the status reaches a terminal value. Use the trace operation for the raw execution event log, or the monitor operation to follow a run live.
GET
/
v2
/
eval-runs
/
{run_id}
Retrieve an eval run
curl --request GET \
--url https://api.lightsage.com/v2/eval-runs/{run_id} \
--header 'X-Lightsage-Api-Key: <api-key>'import requests
url = "https://api.lightsage.com/v2/eval-runs/{run_id}"
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}', 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}",
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}"
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}")
.header("X-Lightsage-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lightsage.com/v2/eval-runs/{run_id}")
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{
"id": "<string>",
"job_id": "<string>",
"status": "<string>",
"eval_id": "<string>",
"eval_name": "<string>",
"configuration_id": "<string>",
"persona": "<string>",
"agent": [
"<string>"
],
"prompt_count": 1,
"runs": 1,
"attempt_count": 1,
"stage": "<string>",
"dispatch_id": "<string>",
"progress": {
"total": 0,
"queued": 0,
"running": 0,
"completed": 0,
"failed": 0,
"cancelled": 0,
"retrying": 0,
"interrupted": 0,
"percent": 0
},
"estimated_cost": 123,
"error": "<string>",
"created_at": "<string>",
"started_at": "<string>",
"completed_at": "<string>",
"results": [
{
"id": "<string>",
"eval_id": "<string>",
"agent": "<string>",
"agent_version": "<string>",
"prompt": "<string>",
"prompt_index": 0,
"repeat_index": 0,
"passed": true,
"score": 123,
"failure_reasons": [
"<string>"
],
"grader_results": [
{
"name": "<string>",
"label": "<string>",
"passed": true,
"score": 123,
"deductions": [
"<string>"
],
"details": "<string>",
"criteria_verdicts": [
{
"criterion": "<string>",
"verdict": "PASS",
"evidence": "<string>"
}
],
"not_applicable": false
}
],
"preference_result": {
"outcome": "won",
"winner_name": "<string>",
"competitor_name": "<string>",
"competitor_domain": "<string>"
},
"latency_ms": 123,
"tool_calls": [
{
"timing_basis": "timed_by_agent",
"tool_call_id": "<string>",
"tool_name": "<string>",
"duration_ms": 1,
"started_at": "<string>",
"completed_at": "<string>"
}
],
"search_grounding": "disabled",
"web_retrieval_observed": true,
"search_observed": true,
"grounding_qualified": true,
"grounding_qualification_reason": "<string>",
"created_at": "<string>",
"environment": {
"id": "<string>",
"name": "<string>",
"updated_at": "<string>",
"queued_at": "<string>",
"variable_names": [
"<string>"
],
"inline": false,
"changed_since_queued": true
},
"setup_output": [
{
"command": "<string>",
"exit_code": 123,
"status": "<string>",
"output": "<string>",
"output_truncated": false
}
]
}
],
"analysis": [
{
"id": "<string>",
"result_id": "<string>",
"attempt_id": "<string>",
"eval_id": "<string>",
"agent": "<string>",
"prompt": "<string>",
"prompt_index": 0,
"variant_key": "default",
"repeat_index": 0,
"analysis_version": "<string>",
"analysis": {},
"created_at": "<string>",
"updated_at": "<string>"
}
],
"results_truncated": false
}{
"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": {}
}
]
}Response
Successful Response