Retrieve Prompt Run
curl --request GET \
--url https://api.lightsage.com/v2/prompts/runs/{run_id} \
--header 'X-Lightsage-Api-Key: <api-key>'import requests
url = "https://api.lightsage.com/v2/prompts/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/prompts/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/prompts/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/prompts/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/prompts/runs/{run_id}")
.header("X-Lightsage-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lightsage.com/v2/prompts/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>",
"prompt_id": "<string>",
"run_date": "<string>",
"prompt": {
"id": "<string>",
"text": "<string>",
"topic": {
"id": "<string>",
"name": "<string>"
}
},
"platform": {
"id": "<string>",
"name": "<string>"
},
"target_kind": "answer_engine",
"agent": "<string>",
"harness": "<string>",
"model_id": "<string>",
"response_preview": "<string>",
"is_brand_mentioned": true,
"citation_count": 0,
"tool_call_count": 123,
"search_grounding": "disabled",
"web_retrieval_observed": true,
"search_observed": true,
"grounding_qualified": true,
"grounding_qualification_reason": "<string>",
"created_at": "<string>",
"response": "<string>",
"mentions": [
{
"id": "<string>",
"brand": {
"id": "<string>",
"name": "<string>",
"domain": "<string>",
"logo_url": "<string>"
},
"position": 123,
"is_recommended": true,
"is_primary": true,
"quote": "<string>",
"sentiment": "<string>"
}
],
"citations": [
{
"id": "<string>",
"url": "<string>",
"domain": "<string>",
"title": "<string>",
"is_company_link": false,
"position": 123
}
],
"tool_calls": [
{}
],
"conversation_turns": [
{}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Prompts
Retrieve Prompt Run
Returns one stored prompt run, including mentions, citations, and any sanitized coding-agent trace captured for the run.
GET
/
v2
/
prompts
/
runs
/
{run_id}
Retrieve Prompt Run
curl --request GET \
--url https://api.lightsage.com/v2/prompts/runs/{run_id} \
--header 'X-Lightsage-Api-Key: <api-key>'import requests
url = "https://api.lightsage.com/v2/prompts/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/prompts/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/prompts/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/prompts/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/prompts/runs/{run_id}")
.header("X-Lightsage-Api-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.lightsage.com/v2/prompts/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>",
"prompt_id": "<string>",
"run_date": "<string>",
"prompt": {
"id": "<string>",
"text": "<string>",
"topic": {
"id": "<string>",
"name": "<string>"
}
},
"platform": {
"id": "<string>",
"name": "<string>"
},
"target_kind": "answer_engine",
"agent": "<string>",
"harness": "<string>",
"model_id": "<string>",
"response_preview": "<string>",
"is_brand_mentioned": true,
"citation_count": 0,
"tool_call_count": 123,
"search_grounding": "disabled",
"web_retrieval_observed": true,
"search_observed": true,
"grounding_qualified": true,
"grounding_qualification_reason": "<string>",
"created_at": "<string>",
"response": "<string>",
"mentions": [
{
"id": "<string>",
"brand": {
"id": "<string>",
"name": "<string>",
"domain": "<string>",
"logo_url": "<string>"
},
"position": 123,
"is_recommended": true,
"is_primary": true,
"quote": "<string>",
"sentiment": "<string>"
}
],
"citations": [
{
"id": "<string>",
"url": "<string>",
"domain": "<string>",
"title": "<string>",
"is_company_link": false,
"position": 123
}
],
"tool_calls": [
{}
],
"conversation_turns": [
{}
]
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Response
Successful Response