curl --request GET \
--url https://dev.api.galtea.ai/v2/metrics/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://dev.api.galtea.ai/v2/metrics/{id}"
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/{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://dev.api.galtea.ai/v2/metrics/{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 => [
"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/{id}"
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/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.api.galtea.ai/v2/metrics/{id}")
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"
}Get metric by ID
Get a metric with the id of its active revision. The id is a metric id. A revision id answers 404. See Metrics.
curl --request GET \
--url https://dev.api.galtea.ai/v2/metrics/{id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://dev.api.galtea.ai/v2/metrics/{id}"
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/{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://dev.api.galtea.ai/v2/metrics/{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 => [
"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/{id}"
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/{id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://dev.api.galtea.ai/v2/metrics/{id}")
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"
}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. A revision ID answers 404; read a revision under /v2/revisions.
1"metric_123"
Response
Metric 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.