Submit Eval Batch
curl --request POST \
--url https://api.enkryptai.com/rt/eval \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"samples": [
{
"query": "<string>",
"response": "<string>",
"test_type": "<string>",
"goal": "<string>",
"tags": {}
}
],
"context": {
"system_description": "<string>",
"policy_description": "<string>",
"policy_rules": [
{
"id": "<string>",
"text": "<string>",
"risk_category": "<string>",
"severity": "<string>",
"frameworks": [
"<string>"
]
}
]
},
"run_name": "<string>",
"user_metadata": {}
}
'import requests
url = "https://api.enkryptai.com/rt/eval"
payload = {
"samples": [
{
"query": "<string>",
"response": "<string>",
"test_type": "<string>",
"goal": "<string>",
"tags": {}
}
],
"context": {
"system_description": "<string>",
"policy_description": "<string>",
"policy_rules": [
{
"id": "<string>",
"text": "<string>",
"risk_category": "<string>",
"severity": "<string>",
"frameworks": ["<string>"]
}
]
},
"run_name": "<string>",
"user_metadata": {}
}
headers = {
"apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apikey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
samples: [
{
query: '<string>',
response: '<string>',
test_type: '<string>',
goal: '<string>',
tags: {}
}
],
context: {
system_description: '<string>',
policy_description: '<string>',
policy_rules: [
{
id: '<string>',
text: '<string>',
risk_category: '<string>',
severity: '<string>',
frameworks: ['<string>']
}
]
},
run_name: '<string>',
user_metadata: {}
})
};
fetch('https://api.enkryptai.com/rt/eval', 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.enkryptai.com/rt/eval",
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([
'samples' => [
[
'query' => '<string>',
'response' => '<string>',
'test_type' => '<string>',
'goal' => '<string>',
'tags' => [
]
]
],
'context' => [
'system_description' => '<string>',
'policy_description' => '<string>',
'policy_rules' => [
[
'id' => '<string>',
'text' => '<string>',
'risk_category' => '<string>',
'severity' => '<string>',
'frameworks' => [
'<string>'
]
]
]
],
'run_name' => '<string>',
'user_metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <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.enkryptai.com/rt/eval"
payload := strings.NewReader("{\n \"samples\": [\n {\n \"query\": \"<string>\",\n \"response\": \"<string>\",\n \"test_type\": \"<string>\",\n \"goal\": \"<string>\",\n \"tags\": {}\n }\n ],\n \"context\": {\n \"system_description\": \"<string>\",\n \"policy_description\": \"<string>\",\n \"policy_rules\": [\n {\n \"id\": \"<string>\",\n \"text\": \"<string>\",\n \"risk_category\": \"<string>\",\n \"severity\": \"<string>\",\n \"frameworks\": [\n \"<string>\"\n ]\n }\n ]\n },\n \"run_name\": \"<string>\",\n \"user_metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<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.enkryptai.com/rt/eval")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"samples\": [\n {\n \"query\": \"<string>\",\n \"response\": \"<string>\",\n \"test_type\": \"<string>\",\n \"goal\": \"<string>\",\n \"tags\": {}\n }\n ],\n \"context\": {\n \"system_description\": \"<string>\",\n \"policy_description\": \"<string>\",\n \"policy_rules\": [\n {\n \"id\": \"<string>\",\n \"text\": \"<string>\",\n \"risk_category\": \"<string>\",\n \"severity\": \"<string>\",\n \"frameworks\": [\n \"<string>\"\n ]\n }\n ]\n },\n \"run_name\": \"<string>\",\n \"user_metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enkryptai.com/rt/eval")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"samples\": [\n {\n \"query\": \"<string>\",\n \"response\": \"<string>\",\n \"test_type\": \"<string>\",\n \"goal\": \"<string>\",\n \"tags\": {}\n }\n ],\n \"context\": {\n \"system_description\": \"<string>\",\n \"policy_description\": \"<string>\",\n \"policy_rules\": [\n {\n \"id\": \"<string>\",\n \"text\": \"<string>\",\n \"risk_category\": \"<string>\",\n \"severity\": \"<string>\",\n \"frameworks\": [\n \"<string>\"\n ]\n }\n ]\n },\n \"run_name\": \"<string>\",\n \"user_metadata\": {}\n}"
response = http.request(request)
puts response.read_body{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}🔴 Red Team API
Submit Eval Batch
Submit a batch of (query, response, test_type) rows to the evaluator.
Each sample becomes one record + one eval cell; the eval pillar judges
each row and writes back success/classification/reasoning/confidence.
Verdicts are retrieved via GET /v1/runs/{run_id}/records.
POST
/
rt
/
eval
Submit Eval Batch
curl --request POST \
--url https://api.enkryptai.com/rt/eval \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"samples": [
{
"query": "<string>",
"response": "<string>",
"test_type": "<string>",
"goal": "<string>",
"tags": {}
}
],
"context": {
"system_description": "<string>",
"policy_description": "<string>",
"policy_rules": [
{
"id": "<string>",
"text": "<string>",
"risk_category": "<string>",
"severity": "<string>",
"frameworks": [
"<string>"
]
}
]
},
"run_name": "<string>",
"user_metadata": {}
}
'import requests
url = "https://api.enkryptai.com/rt/eval"
payload = {
"samples": [
{
"query": "<string>",
"response": "<string>",
"test_type": "<string>",
"goal": "<string>",
"tags": {}
}
],
"context": {
"system_description": "<string>",
"policy_description": "<string>",
"policy_rules": [
{
"id": "<string>",
"text": "<string>",
"risk_category": "<string>",
"severity": "<string>",
"frameworks": ["<string>"]
}
]
},
"run_name": "<string>",
"user_metadata": {}
}
headers = {
"apikey": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {apikey: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
samples: [
{
query: '<string>',
response: '<string>',
test_type: '<string>',
goal: '<string>',
tags: {}
}
],
context: {
system_description: '<string>',
policy_description: '<string>',
policy_rules: [
{
id: '<string>',
text: '<string>',
risk_category: '<string>',
severity: '<string>',
frameworks: ['<string>']
}
]
},
run_name: '<string>',
user_metadata: {}
})
};
fetch('https://api.enkryptai.com/rt/eval', 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.enkryptai.com/rt/eval",
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([
'samples' => [
[
'query' => '<string>',
'response' => '<string>',
'test_type' => '<string>',
'goal' => '<string>',
'tags' => [
]
]
],
'context' => [
'system_description' => '<string>',
'policy_description' => '<string>',
'policy_rules' => [
[
'id' => '<string>',
'text' => '<string>',
'risk_category' => '<string>',
'severity' => '<string>',
'frameworks' => [
'<string>'
]
]
]
],
'run_name' => '<string>',
'user_metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"apikey: <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.enkryptai.com/rt/eval"
payload := strings.NewReader("{\n \"samples\": [\n {\n \"query\": \"<string>\",\n \"response\": \"<string>\",\n \"test_type\": \"<string>\",\n \"goal\": \"<string>\",\n \"tags\": {}\n }\n ],\n \"context\": {\n \"system_description\": \"<string>\",\n \"policy_description\": \"<string>\",\n \"policy_rules\": [\n {\n \"id\": \"<string>\",\n \"text\": \"<string>\",\n \"risk_category\": \"<string>\",\n \"severity\": \"<string>\",\n \"frameworks\": [\n \"<string>\"\n ]\n }\n ]\n },\n \"run_name\": \"<string>\",\n \"user_metadata\": {}\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("apikey", "<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.enkryptai.com/rt/eval")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"samples\": [\n {\n \"query\": \"<string>\",\n \"response\": \"<string>\",\n \"test_type\": \"<string>\",\n \"goal\": \"<string>\",\n \"tags\": {}\n }\n ],\n \"context\": {\n \"system_description\": \"<string>\",\n \"policy_description\": \"<string>\",\n \"policy_rules\": [\n {\n \"id\": \"<string>\",\n \"text\": \"<string>\",\n \"risk_category\": \"<string>\",\n \"severity\": \"<string>\",\n \"frameworks\": [\n \"<string>\"\n ]\n }\n ]\n },\n \"run_name\": \"<string>\",\n \"user_metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enkryptai.com/rt/eval")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["apikey"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"samples\": [\n {\n \"query\": \"<string>\",\n \"response\": \"<string>\",\n \"test_type\": \"<string>\",\n \"goal\": \"<string>\",\n \"tags\": {}\n }\n ],\n \"context\": {\n \"system_description\": \"<string>\",\n \"policy_description\": \"<string>\",\n \"policy_rules\": [\n {\n \"id\": \"<string>\",\n \"text\": \"<string>\",\n \"risk_category\": \"<string>\",\n \"severity\": \"<string>\",\n \"frameworks\": [\n \"<string>\"\n ]\n }\n ]\n },\n \"run_name\": \"<string>\",\n \"user_metadata\": {}\n}"
response = http.request(request)
puts response.read_body{}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}Authorizations
Body
application/json
POST /v1/eval payload.
context.policy_description is optional grounding for evaluators that
consult policy text (e.g. the agent judge). samples is the non-empty
list of rows to score.
Response
Successful Response
The accepted eval run. Carries run_id, status_url, records_url, websocket_url (the SSE progress stream) and logs_url (the live log socket - join it onto wss://api.enkryptai.com/wss/redteam/v1/logs/tasks/).

