curl --request GET \
--url https://api.galtea.ai/analytics/insights \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.galtea.ai/analytics/insights"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.galtea.ai/analytics/insights', 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.galtea.ai/analytics/insights",
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.galtea.ai/analytics/insights"
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.galtea.ai/analytics/insights")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.galtea.ai/analytics/insights")
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{
"productId": "prod_123",
"versionId": "ver_123",
"versionName": "v3",
"status": "flags_present",
"flags": [
{
"type": "low_metric_score",
"severity": "critical",
"title": "Low score: Faithfulness",
"description": "Faithfulness scored 42% on v3; 12 of 78 evaluations scored zero (15.4%).",
"testType": "QUALITY",
"versionId": "ver_123",
"versionName": "v3",
"metricId": "metric_123",
"metricName": "Faithfulness",
"specificationId": "spec_123",
"currentValue": 42,
"comparisonValue": 71,
"unit": "%",
"failureRate": 15.4,
"evaluationCount": 78
}
],
"narrativeGeneratedByAi": true,
"narrative": "Faithfulness dropped sharply on v3 and two specifications still have no coverage."
}{
"error": "Error type",
"message": "Error message description"
}{
"error": "Error type",
"message": "Error message description"
}Get analytics insights for a version
Computes deterministic red flags / proactive insights (low metric scores, specification coverage gaps) for a single version, plus a fail-open LLM-generated narrative summary. See Platform Overview.
curl --request GET \
--url https://api.galtea.ai/analytics/insights \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.galtea.ai/analytics/insights"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.galtea.ai/analytics/insights', 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.galtea.ai/analytics/insights",
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.galtea.ai/analytics/insights"
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.galtea.ai/analytics/insights")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.galtea.ai/analytics/insights")
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{
"productId": "prod_123",
"versionId": "ver_123",
"versionName": "v3",
"status": "flags_present",
"flags": [
{
"type": "low_metric_score",
"severity": "critical",
"title": "Low score: Faithfulness",
"description": "Faithfulness scored 42% on v3; 12 of 78 evaluations scored zero (15.4%).",
"testType": "QUALITY",
"versionId": "ver_123",
"versionName": "v3",
"metricId": "metric_123",
"metricName": "Faithfulness",
"specificationId": "spec_123",
"currentValue": 42,
"comparisonValue": 71,
"unit": "%",
"failureRate": 15.4,
"evaluationCount": 78
}
],
"narrativeGeneratedByAi": true,
"narrative": "Faithfulness dropped sharply on v3 and two specifications still have no coverage."
}{
"error": "Error type",
"message": "Error message description"
}{
"error": "Error type",
"message": "Error message description"
}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-....
Query Parameters
Product ID (required)
Version ID to compute insights for (required)
Filter by test IDs
Filter by metric IDs
Filter by language codes
Start date for filtering
End date for filtering
When true (default), a fail-open LLM-generated narrative summary is computed and returned alongside the deterministic flags. When false, the narrative LLM call is skipped entirely and the response carries narrative: null and narrativeGeneratedByAi: false; the deterministic flags are unchanged. Machine consumers that produce their own prose should pass false to avoid the wasted LLM call.
When set, returns only production (true) or only development (false) data. Omit to include both.
Response
Analytics insights computed successfully
Single-version analytics insights: deterministic flags plus a fail-open LLM-generated narrative summary (the narrative is omitted when the request sets includeNarrative=false).
"prod_123"
"ver_123"
"v3"
all_good, flags_present "flags_present"
Show child attributes
Show child attributes
True when the narrative was successfully produced by the LLM; false otherwise (including when includeNarrative=false).
LLM-generated narrative summary, or null when generation was skipped (includeNarrative=false or no flags) or failed.
"Faithfulness dropped sharply on v3 and two specifications still have no coverage."