curl --request POST \
--url https://api.galtea.ai/metrics/{id}/classifier-conversion \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.galtea.ai/metrics/{id}/classifier-conversion"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.galtea.ai/metrics/{id}/classifier-conversion', 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}/classifier-conversion",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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}/classifier-conversion"
req, _ := http.NewRequest("POST", 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.post("https://api.galtea.ai/metrics/{id}/classifier-conversion")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.galtea.ai/metrics/{id}/classifier-conversion")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"proposals": [
{
"name": "<string>",
"classifierQuestion": {
"type": "yes_no",
"instructions": "<string>",
"goodAnswer": "yes",
"criteria": {
"yes": "<string>",
"no": "<string>"
},
"levels": [
{
"description": "<string>",
"score": 123
}
],
"doesNotApply": "<string>"
},
"evaluationParams": [
"<string>"
],
"label": "<string>",
"text": "<string>"
}
],
"merged": {
"name": "<string>",
"classifierQuestion": {
"type": "yes_no",
"instructions": "<string>",
"goodAnswer": "yes",
"criteria": {
"yes": "<string>",
"no": "<string>"
},
"levels": [
{
"description": "<string>",
"score": 123
}
],
"doesNotApply": "<string>"
},
"evaluationParams": [
"<string>"
]
},
"refused": [
{
"text": "<string>",
"reason": "<string>",
"suggestion": "<string>"
}
],
"specifications": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"productId": "<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"
}{
"error": "Error type",
"message": "Error message description"
}{
"error": "Error type",
"message": "Error message description"
}Propose Classifier (Jev) metrics for an LLM judge metric
Splits an LLM judge (PARTIAL_PROMPT) metric’s judge prompt into one classifier question per condition, plus one question listing them all when every condition always applies. Persists nothing, consumes no credits, and leaves the source metric unchanged. Create the proposals with POST /metrics/bulk. Answers 400 where the deployment does not enable Classifier (Jev) metrics.
curl --request POST \
--url https://api.galtea.ai/metrics/{id}/classifier-conversion \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.galtea.ai/metrics/{id}/classifier-conversion"
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, headers=headers)
print(response.text)const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.galtea.ai/metrics/{id}/classifier-conversion', 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}/classifier-conversion",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
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}/classifier-conversion"
req, _ := http.NewRequest("POST", 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.post("https://api.galtea.ai/metrics/{id}/classifier-conversion")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.galtea.ai/metrics/{id}/classifier-conversion")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"proposals": [
{
"name": "<string>",
"classifierQuestion": {
"type": "yes_no",
"instructions": "<string>",
"goodAnswer": "yes",
"criteria": {
"yes": "<string>",
"no": "<string>"
},
"levels": [
{
"description": "<string>",
"score": 123
}
],
"doesNotApply": "<string>"
},
"evaluationParams": [
"<string>"
],
"label": "<string>",
"text": "<string>"
}
],
"merged": {
"name": "<string>",
"classifierQuestion": {
"type": "yes_no",
"instructions": "<string>",
"goodAnswer": "yes",
"criteria": {
"yes": "<string>",
"no": "<string>"
},
"levels": [
{
"description": "<string>",
"score": 123
}
],
"doesNotApply": "<string>"
},
"evaluationParams": [
"<string>"
]
},
"refused": [
{
"text": "<string>",
"reason": "<string>",
"suggestion": "<string>"
}
],
"specifications": [
{
"id": "<string>",
"name": "<string>",
"description": "<string>",
"productId": "<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"
}{
"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
The LLM judge (PARTIAL_PROMPT) metric to convert
"metric_123"
Response
The proposed classifier metrics
One classifier metric per condition of the judge prompt.
Show child attributes
Show child attributes
One classifier metric whose question lists every condition. Null when there are fewer than two conditions or one of them does not always apply.
Show child attributes
Show child attributes
The parts no classifier question can check.
Show child attributes
Show child attributes
The source metric's specifications. Send their ids with each metric to link it to them.
Show child attributes
Show child attributes