cURL
curl --request POST \
--url https://api.cekura.ai/test_framework/v1/metrics/preview/ \
--header 'Content-Type: application/json' \
--header 'X-CEKURA-API-KEY: <api-key>' \
--data '
{
"metric_data": {
"name": "<string>",
"evaluation_trigger": "always",
"trigger_type": "llm_judge",
"evaluation_trigger_prompt": "",
"evaluation_trigger_custom_code": "",
"description": "",
"prompt": "",
"custom_code": "",
"enum_values": [
"<string>"
]
},
"agent_id": 123,
"project_id": 123,
"call_log_ids": [
123
],
"run_ids": [
123
]
}
'import requests
url = "https://api.cekura.ai/test_framework/v1/metrics/preview/"
payload = {
"metric_data": {
"name": "<string>",
"evaluation_trigger": "always",
"trigger_type": "llm_judge",
"evaluation_trigger_prompt": "",
"evaluation_trigger_custom_code": "",
"description": "",
"prompt": "",
"custom_code": "",
"enum_values": ["<string>"]
},
"agent_id": 123,
"project_id": 123,
"call_log_ids": [123],
"run_ids": [123]
}
headers = {
"X-CEKURA-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-CEKURA-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
metric_data: {
name: '<string>',
evaluation_trigger: 'always',
trigger_type: 'llm_judge',
evaluation_trigger_prompt: '',
evaluation_trigger_custom_code: '',
description: '',
prompt: '',
custom_code: '',
enum_values: ['<string>']
},
agent_id: 123,
project_id: 123,
call_log_ids: [123],
run_ids: [123]
})
};
fetch('https://api.cekura.ai/test_framework/v1/metrics/preview/', 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.cekura.ai/test_framework/v1/metrics/preview/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'metric_data' => [
'name' => '<string>',
'evaluation_trigger' => 'always',
'trigger_type' => 'llm_judge',
'evaluation_trigger_prompt' => '',
'evaluation_trigger_custom_code' => '',
'description' => '',
'prompt' => '',
'custom_code' => '',
'enum_values' => [
'<string>'
]
],
'agent_id' => 123,
'project_id' => 123,
'call_log_ids' => [
123
],
'run_ids' => [
123
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-CEKURA-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cekura.ai/test_framework/v1/metrics/preview/"
payload := strings.NewReader("{\n \"metric_data\": {\n \"name\": \"<string>\",\n \"evaluation_trigger\": \"always\",\n \"trigger_type\": \"llm_judge\",\n \"evaluation_trigger_prompt\": \"\",\n \"evaluation_trigger_custom_code\": \"\",\n \"description\": \"\",\n \"prompt\": \"\",\n \"custom_code\": \"\",\n \"enum_values\": [\n \"<string>\"\n ]\n },\n \"agent_id\": 123,\n \"project_id\": 123,\n \"call_log_ids\": [\n 123\n ],\n \"run_ids\": [\n 123\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-CEKURA-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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.cekura.ai/test_framework/v1/metrics/preview/")
.header("X-CEKURA-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"metric_data\": {\n \"name\": \"<string>\",\n \"evaluation_trigger\": \"always\",\n \"trigger_type\": \"llm_judge\",\n \"evaluation_trigger_prompt\": \"\",\n \"evaluation_trigger_custom_code\": \"\",\n \"description\": \"\",\n \"prompt\": \"\",\n \"custom_code\": \"\",\n \"enum_values\": [\n \"<string>\"\n ]\n },\n \"agent_id\": 123,\n \"project_id\": 123,\n \"call_log_ids\": [\n 123\n ],\n \"run_ids\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cekura.ai/test_framework/v1/metrics/preview/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-CEKURA-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metric_data\": {\n \"name\": \"<string>\",\n \"evaluation_trigger\": \"always\",\n \"trigger_type\": \"llm_judge\",\n \"evaluation_trigger_prompt\": \"\",\n \"evaluation_trigger_custom_code\": \"\",\n \"description\": \"\",\n \"prompt\": \"\",\n \"custom_code\": \"\",\n \"enum_values\": [\n \"<string>\"\n ]\n },\n \"agent_id\": 123,\n \"project_id\": 123,\n \"call_log_ids\": [\n 123\n ],\n \"run_ids\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_bodyMetrics
Preview Metric
Preview metric evaluation on call logs or runs before creating it. Supports up to 10 items. Returns progress_id to poll for results.
POST
/
test_framework
/
v1
/
metrics
/
preview
/
cURL
curl --request POST \
--url https://api.cekura.ai/test_framework/v1/metrics/preview/ \
--header 'Content-Type: application/json' \
--header 'X-CEKURA-API-KEY: <api-key>' \
--data '
{
"metric_data": {
"name": "<string>",
"evaluation_trigger": "always",
"trigger_type": "llm_judge",
"evaluation_trigger_prompt": "",
"evaluation_trigger_custom_code": "",
"description": "",
"prompt": "",
"custom_code": "",
"enum_values": [
"<string>"
]
},
"agent_id": 123,
"project_id": 123,
"call_log_ids": [
123
],
"run_ids": [
123
]
}
'import requests
url = "https://api.cekura.ai/test_framework/v1/metrics/preview/"
payload = {
"metric_data": {
"name": "<string>",
"evaluation_trigger": "always",
"trigger_type": "llm_judge",
"evaluation_trigger_prompt": "",
"evaluation_trigger_custom_code": "",
"description": "",
"prompt": "",
"custom_code": "",
"enum_values": ["<string>"]
},
"agent_id": 123,
"project_id": 123,
"call_log_ids": [123],
"run_ids": [123]
}
headers = {
"X-CEKURA-API-KEY": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-CEKURA-API-KEY': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
metric_data: {
name: '<string>',
evaluation_trigger: 'always',
trigger_type: 'llm_judge',
evaluation_trigger_prompt: '',
evaluation_trigger_custom_code: '',
description: '',
prompt: '',
custom_code: '',
enum_values: ['<string>']
},
agent_id: 123,
project_id: 123,
call_log_ids: [123],
run_ids: [123]
})
};
fetch('https://api.cekura.ai/test_framework/v1/metrics/preview/', 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.cekura.ai/test_framework/v1/metrics/preview/",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'metric_data' => [
'name' => '<string>',
'evaluation_trigger' => 'always',
'trigger_type' => 'llm_judge',
'evaluation_trigger_prompt' => '',
'evaluation_trigger_custom_code' => '',
'description' => '',
'prompt' => '',
'custom_code' => '',
'enum_values' => [
'<string>'
]
],
'agent_id' => 123,
'project_id' => 123,
'call_log_ids' => [
123
],
'run_ids' => [
123
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-CEKURA-API-KEY: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cekura.ai/test_framework/v1/metrics/preview/"
payload := strings.NewReader("{\n \"metric_data\": {\n \"name\": \"<string>\",\n \"evaluation_trigger\": \"always\",\n \"trigger_type\": \"llm_judge\",\n \"evaluation_trigger_prompt\": \"\",\n \"evaluation_trigger_custom_code\": \"\",\n \"description\": \"\",\n \"prompt\": \"\",\n \"custom_code\": \"\",\n \"enum_values\": [\n \"<string>\"\n ]\n },\n \"agent_id\": 123,\n \"project_id\": 123,\n \"call_log_ids\": [\n 123\n ],\n \"run_ids\": [\n 123\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-CEKURA-API-KEY", "<api-key>")
req.Header.Add("Content-Type", "application/json")
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.cekura.ai/test_framework/v1/metrics/preview/")
.header("X-CEKURA-API-KEY", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"metric_data\": {\n \"name\": \"<string>\",\n \"evaluation_trigger\": \"always\",\n \"trigger_type\": \"llm_judge\",\n \"evaluation_trigger_prompt\": \"\",\n \"evaluation_trigger_custom_code\": \"\",\n \"description\": \"\",\n \"prompt\": \"\",\n \"custom_code\": \"\",\n \"enum_values\": [\n \"<string>\"\n ]\n },\n \"agent_id\": 123,\n \"project_id\": 123,\n \"call_log_ids\": [\n 123\n ],\n \"run_ids\": [\n 123\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cekura.ai/test_framework/v1/metrics/preview/")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-CEKURA-API-KEY"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"metric_data\": {\n \"name\": \"<string>\",\n \"evaluation_trigger\": \"always\",\n \"trigger_type\": \"llm_judge\",\n \"evaluation_trigger_prompt\": \"\",\n \"evaluation_trigger_custom_code\": \"\",\n \"description\": \"\",\n \"prompt\": \"\",\n \"custom_code\": \"\",\n \"enum_values\": [\n \"<string>\"\n ]\n },\n \"agent_id\": 123,\n \"project_id\": 123,\n \"call_log_ids\": [\n 123\n ],\n \"run_ids\": [\n 123\n ]\n}"
response = http.request(request)
puts response.read_bodyAuthorizations
API Key Authentication. It should be included in the header of each request.
Body
application/jsonapplication/x-www-form-urlencodedmultipart/form-data
Metric configuration to evaluate
Show child attributes
Show child attributes
Agent ID - all call logs/runs must belong to this agent
Project ID - all call logs/runs must belong to this project
List of call log IDs to evaluate (maximum 10, required if run_ids not provided)
Required array length:
1 - 10 elementsList of run IDs to evaluate (maximum 10, required if call_log_ids not provided)
Required array length:
1 - 10 elementsResponse
200
Returns progress_id for tracking progress
⌘I