curl --request GET \
--url https://api.galtea.ai/metrics/{id}/human-annotation-count \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.galtea.ai/metrics/{id}/human-annotation-count"
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/metrics/{id}/human-annotation-count', 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/metrics/{id}/human-annotation-count",
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/metrics/{id}/human-annotation-count"
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/metrics/{id}/human-annotation-count")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.galtea.ai/metrics/{id}/human-annotation-count")
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{
"count": 123,
"disagreementCount": 123,
"minAnnotations": 123,
"minDisagreements": 123,
"minValidationRows": 30,
"plannedSplit": {
"status": "SPLIT",
"trainingRows": 20,
"validationRows": 10,
"reason": "<string>"
}
}{
"error": "Error type",
"message": "Error message description"
}{
"error": "Error type",
"message": "Error message description"
}{
"error": "Error type",
"message": "Error message description"
}{
"error": "Error type",
"message": "Error message description"
}Get human annotation count and optimization eligibility
Returns the optimization-eligibility snapshot for a metric.
count is the number of evaluations that have both an AI score and a human-provided score (annotation). For FULL_PROMPT/PARTIAL_PROMPT metrics this means the AI judged the evaluation and a human later reviewed it. For HUMAN_EVALUATION metrics both fields hold the same human-provided value (for analytics compatibility).
disagreementCount is the subset of count where the human verdict flips the AI’s verdict. Both are binarized at the metric’s pass threshold (a score at or above it is class 1, anything below is class 0) and the row counts only when the two classes differ. These are the rows the optimizer learns from.
minAnnotations and minDisagreements are the api-enforced thresholds (mirrored from the metrics-generator hard thresholds). Optimize is rejected early unless count >= minAnnotations AND disagreementCount >= minDisagreements.
plannedSplit is the split the next optimize would make, from the same count gates and split the run applies: the training and validation row counts, or the refusal text when optimize would answer a 400 (too few annotations, too few disagreements, or too few left to train on after the evaluations earlier attempts kept for validation).
A caller limited to the products its user groups grant gets counts and a split from the evaluations of those products only.
curl --request GET \
--url https://api.galtea.ai/metrics/{id}/human-annotation-count \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.galtea.ai/metrics/{id}/human-annotation-count"
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/metrics/{id}/human-annotation-count', 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/metrics/{id}/human-annotation-count",
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/metrics/{id}/human-annotation-count"
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/metrics/{id}/human-annotation-count")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.galtea.ai/metrics/{id}/human-annotation-count")
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{
"count": 123,
"disagreementCount": 123,
"minAnnotations": 123,
"minDisagreements": 123,
"minValidationRows": 30,
"plannedSplit": {
"status": "SPLIT",
"trainingRows": 20,
"validationRows": 10,
"reason": "<string>"
}
}{
"error": "Error type",
"message": "Error message description"
}{
"error": "Error type",
"message": "Error message description"
}{
"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-....
Path Parameters
Metric ID
"metric_123"
Response
Annotation counts, thresholds and the planned split retrieved successfully
Evaluations with both an AI score and a human score.
Subset of count where the human verdict flips the AI's (AI and human on opposite sides of the metric's pass threshold).
Minimum annotations required to optimize this metric.
Minimum disagreements required to optimize this metric.
From this many annotated evaluations a run keeps a validation set.
30
The split the next optimize would make. Null for a metric that cannot be optimized: one with no organization, a source other than PARTIAL_PROMPT, or a legacy revision.
Show child attributes
Show child attributes