Metrics
POST /v2/create-metrics
Create one or many custom metrics.
POST /v2/create-metrics
curl --request POST \
--url https://api.getbluejay.ai/v2/create-metricsimport requests
url = "https://api.getbluejay.ai/v2/create-metrics"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.getbluejay.ai/v2/create-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://api.getbluejay.ai/v2/create-metrics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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.getbluejay.ai/v2/create-metrics"
req, _ := http.NewRequest("POST", url, nil)
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.getbluejay.ai/v2/create-metrics")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getbluejay.ai/v2/create-metrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_bodyCreates one or many custom metrics.
metrics takes one metric object or a list of them, and the response is always a list. summary is the short description shown with a metric. Link a metric to agents with agent_ids.
{ "metrics": { "name": "Greeting", "prompt": "Did the agent greet the caller?", "response_type": "pass_fail" } }
Headers
Request body
Response
Status codes
| Status | Meaning |
|---|---|
200 | Successful Response |
422 | Validation Error |
Example request
curl --request POST \
--url https://api.getbluejay.ai/v2/create-metrics \
--header 'X-API-Key: <api-key>' \
--header 'Content-Type: application/json' \
--data '{
"metrics": [
{
"bluejay_as_code_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"agent_id": 123,
"agent_ids": [
123
],
"name": "<string>",
"prompt": "<string>",
"summary": "<string>",
"metric_type": "llm_judge",
"settings": {},
"eval_segment": "agent",
"scope": "observability",
"response_type": "pass_fail",
"min_value": 1.5,
"max_value": 1.5,
"category": "<string>",
"tags": [
"<string>"
],
"scoring_guidance": "<string>",
"eval_modality": "AUDIO",
"model": "<string>",
"audio_model": "<string>",
"temperature": 1.5,
"enum_options": [
"<string>"
],
"tool_names": [
"<string>"
],
"json_schema": {},
"allow_not_applicable": false,
"template_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a"
}
]
}'
Example response
200
{
"metrics": [
{
"id": "<string>",
"bluejay_as_code_id": "<string>",
"name": "<string>",
"prompt": "<string>",
"description": "<string>",
"summary": "<string>",
"metric_type": "llm_judge",
"eval_method": "llm_judge",
"settings": {},
"eval_segment": "all",
"scope": "all",
"response_type": "pass_fail",
"agent_ids": [
123
],
"min_value": 1.5,
"max_value": 1.5,
"category": "<string>",
"tags": [
"<string>"
],
"scoring_guidance": "<string>",
"created_at": "2026-01-01T00:00:00Z",
"updated_at": "2026-01-01T00:00:00Z",
"updated_by": "<string>",
"created_by": "<string>",
"eval_modality": "AUDIO",
"model": "<string>",
"audio_model": "<string>",
"temperature": 1.5,
"enum_options": [
"<string>"
],
"tool_names": [
"<string>"
],
"json_schema": {},
"allow_not_applicable": false,
"eval_modality_auto_selected": false,
"template_id": "<string>",
"source": "custom"
}
]
}
Last modified on November 16, 2026
⌘I
POST /v2/create-metrics
curl --request POST \
--url https://api.getbluejay.ai/v2/create-metricsimport requests
url = "https://api.getbluejay.ai/v2/create-metrics"
response = requests.post(url)
print(response.text)const options = {method: 'POST'};
fetch('https://api.getbluejay.ai/v2/create-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://api.getbluejay.ai/v2/create-metrics",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
]);
$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.getbluejay.ai/v2/create-metrics"
req, _ := http.NewRequest("POST", url, nil)
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.getbluejay.ai/v2/create-metrics")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.getbluejay.ai/v2/create-metrics")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
response = http.request(request)
puts response.read_body