curl --request GET \
--url https://dev.api.galtea.ai/v2/metrics \
--header 'Authorization: Bearer <token>'import requests
url = "https://dev.api.galtea.ai/v2/metrics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://dev.api.galtea.ai/v2/metrics', 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://dev.api.galtea.ai/v2/metrics",
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://dev.api.galtea.ai/v2/metrics"
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://dev.api.galtea.ai/v2/metrics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.api.galtea.ai/v2/metrics")
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[
{
"id": "metric_123",
"organizationId": "org_123",
"userId": "user_123",
"name": "Accuracy",
"description": "Measures the accuracy of responses",
"tags": [
"accuracy",
"quality"
],
"documentationUrl": "https://docs.example.com/metrics/accuracy",
"source": "PARTIAL_PROMPT",
"activeRevisionId": "revision_123",
"activeRevision": {
"id": "revision_123",
"number": 3,
"name": "Stricter rubric",
"evaluatorModelName": "gpt-4",
"evaluationParams": [
"input",
"actual_output",
"expected_output"
],
"availability": {
"state": "AVAILABLE",
"at": "2023-11-07T05:31:56Z",
"cause": null,
"reason": null
},
"optimizationStatus": "READY_FOR_REVIEW",
"excludedFromAnalyticsAt": "2023-11-07T05:31:56Z",
"agreement": 87.5,
"annotationCount": 24,
"evaluationCount": 310,
"minAnnotationsForAgreement": 10
},
"createdAt": "2023-11-07T05:31:56Z",
"disabledAt": "2023-11-07T05:31:56Z"
}
]{
"error": "NotFound",
"message": "Product not found"
}{
"error": "NotFound",
"message": "Product not found"
}{
"error": "NotFound",
"message": "Product not found"
}{
"error": "NotFound",
"message": "Product not found"
}List metrics
List metrics, each once, with the id of its active revision and no revision inline. The list holds the metrics of the caller’s organization and the Galtea metrics. An admin names another organization with organizationId. A caller limited to the products its user groups grant also sees only the metrics those products use, and the Galtea metrics. The active revision carries its agreement with human annotations and its annotation and evaluation counts, over the evaluations of the products the caller reads. A Galtea metric counts only the caller’s organization, or the one an admin names. See Metrics.
curl --request GET \
--url https://dev.api.galtea.ai/v2/metrics \
--header 'Authorization: Bearer <token>'import requests
url = "https://dev.api.galtea.ai/v2/metrics"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://dev.api.galtea.ai/v2/metrics', 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://dev.api.galtea.ai/v2/metrics",
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://dev.api.galtea.ai/v2/metrics"
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://dev.api.galtea.ai/v2/metrics")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.api.galtea.ai/v2/metrics")
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[
{
"id": "metric_123",
"organizationId": "org_123",
"userId": "user_123",
"name": "Accuracy",
"description": "Measures the accuracy of responses",
"tags": [
"accuracy",
"quality"
],
"documentationUrl": "https://docs.example.com/metrics/accuracy",
"source": "PARTIAL_PROMPT",
"activeRevisionId": "revision_123",
"activeRevision": {
"id": "revision_123",
"number": 3,
"name": "Stricter rubric",
"evaluatorModelName": "gpt-4",
"evaluationParams": [
"input",
"actual_output",
"expected_output"
],
"availability": {
"state": "AVAILABLE",
"at": "2023-11-07T05:31:56Z",
"cause": null,
"reason": null
},
"optimizationStatus": "READY_FOR_REVIEW",
"excludedFromAnalyticsAt": "2023-11-07T05:31:56Z",
"agreement": 87.5,
"annotationCount": 24,
"evaluationCount": 310,
"minAnnotationsForAgreement": 10
},
"createdAt": "2023-11-07T05:31:56Z",
"disabledAt": "2023-11-07T05:31:56Z"
}
]{
"error": "NotFound",
"message": "Product not found"
}{
"error": "NotFound",
"message": "Product not found"
}{
"error": "NotFound",
"message": "Product not found"
}{
"error": "NotFound",
"message": "Product not found"
}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
Filter by metric IDs
Filter by metric name (partial match, case insensitive)
Filter by metric names (exact match, case insensitive, multiple)
Filter by tags; a metric matches when it holds one of them
Filter by metric sources. CLASSIFIER is the deprecated name of DECISION, accepted until 2028-01-17.
SELF_HOSTED, FULL_PROMPT, PARTIAL_PROMPT, HUMAN_EVALUATION, GEVAL, DEEPEVAL, DETERMINISTIC, DECISION, CODE, CLASSIFIER Also list the metrics whose active revision is excluded from analytics. Defaults to false. A metric named in ids is listed either way.
Filter by metric description (partial match, case insensitive)
Filter metrics created at or after this timestamp (ISO 8601 format)
Filter metrics created at or before this timestamp (ISO 8601 format)
List the metrics of the caller's organization. When this or includeDefaultEntities is true, the list holds only the kinds set to true; when neither is, it holds both.
List the Galtea metrics. When this or includeOwnEntities is true, the list holds only the kinds set to true; when neither is, it holds both.
Filter by user groups; a metric matches when one of them links it
Sort instructions (field and direction pairs). The fields are name, createdAt, and the active revision's agreement and annotationCount. Sorted by agreement, a metric with no agreement comes last in both directions. Sorted by agreement or annotationCount, a metric with no active revision comes last in both directions.
Maximum number of results
0 <= x <= 9007199254740991Number of results to skip
x >= 0List the metrics of this organization and the Galtea metrics, instead of the caller's organization. Only a caller who may read another organization (ADMIN, ADMIN_READER) names one; any other caller answers 403. Cannot be combined with allOrganizations.
1Response
Metrics retrieved successfully
Metric ID.
"metric_123"
The organization of the metric. Null for a Galtea metric.
"org_123"
"user_123"
Metric name, unique in its organization.
"Accuracy"
"Measures the accuracy of responses"
["accuracy", "quality"]
"https://docs.example.com/metrics/accuracy"
Evaluation method for the metric. FULL_PROMPT is deprecated for creation — POST /metrics rejects it with a 400. Use PARTIAL_PROMPT for new AI Evaluation metrics. The value remains in the enum because existing FULL_PROMPT metrics are still returned by reads and filters. DECISION is the decision model, accepted only where the deployment enables it.
SELF_HOSTED, FULL_PROMPT, PARTIAL_PROMPT, HUMAN_EVALUATION, GEVAL, DEEPEVAL, DETERMINISTIC, DECISION, CODE "PARTIAL_PROMPT"
The revision that evaluations of this metric run. Null when no revision is active.
"revision_123"
The label, judge settings, dates and judge figures of the active revision, so a list shows them without reading each revision. Null when no revision is active.
Show child attributes
Show child attributes
The metric's own disabled date. It ignores the evaluator model of each revision: read a revision for that.