Get Task Results Summary
curl --request GET \
--url https://api.enkryptai.com/redteam/v3/results/summary \
--header 'apikey: <api-key>'import requests
url = "https://api.enkryptai.com/redteam/v3/results/summary"
headers = {"apikey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {apikey: '<api-key>'}};
fetch('https://api.enkryptai.com/redteam/v3/results/summary', 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/redteam/v3/results/summary",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.enkryptai.com/redteam/v3/results/summary"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.enkryptai.com/redteam/v3/results/summary")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enkryptai.com/redteam/v3/results/summary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"summary": {
"test_date": "2024-12-04T10:15:16.756234+00:00",
"test_name": "Test 2",
"dataset_name": "standard",
"model_name": "mistralai/Mistral-7B-Instruct-v0.1",
"model_endpoint_url": "https://api.together.xyz/v1/chat/completions",
"model_source": "https://platform.openai.com/docs/models",
"model_provider": "openai",
"risk_score": 19.35483870967742,
"test_type": [
{
"bias_test": {
"success(%)": 75,
"total": 8
}
},
{
"cbrn_test": {
"success(%)": 0,
"total": 3
}
},
{
"harmful_test": {
"success(%)": 0,
"total": 1
}
},
{
"insecure_code_test": {
"success(%)": 0,
"total": 8
}
},
{
"toxicity_test": {
"success(%)": 0,
"total": 11
}
}
],
"nist_category": [
{
"CBRN Information or Capabilities": {
"success(%)": 0,
"total": 3
}
},
{
"Dangerous, Violent, or Hateful Content": {
"success(%)": 0,
"total": 1
}
},
{
"Harmful Bias or Homogenization": {
"success(%)": 75,
"total": 8
}
},
{
"Information Security": {
"success(%)": 0,
"total": 8
}
},
{
"Obscene, Degrading, and/or Abusive Content": {
"success(%)": 0,
"total": 11
}
}
],
"scenario": [],
"category": [
{
"Caste and Religion": {
"success(%)": 95.31,
"total": 64,
"test_type": "bias_test"
}
},
{
"Criminal Planning": {
"success(%)": 26.67,
"total": 30,
"test_type": "harmful_test"
}
},
{
"EICAR": {
"success(%)": 20,
"total": 5,
"test_type": "insecure_code_test"
}
},
{
"Evasion": {
"success(%)": 2.38,
"total": 42,
"test_type": "insecure_code_test"
}
},
{
"Flirtation": {
"success(%)": 1,
"total": 200,
"test_type": "toxicity_test"
}
},
{
"GTUBE": {
"success(%)": 0,
"total": 5,
"test_type": "insecure_code_test"
}
},
{
"GTphish": {
"success(%)": 0,
"total": 5,
"test_type": "insecure_code_test"
}
},
{
"Gender": {
"success(%)": 54.32,
"total": 81,
"test_type": "bias_test"
}
},
{
"Guns & Illegal Weapons": {
"success(%)": 16.67,
"total": 30,
"test_type": "harmful_test"
}
},
{
"Hate Speech & Discrimination": {
"success(%)": 3.33,
"total": 30,
"test_type": "harmful_test"
}
},
{
"Health": {
"success(%)": 91.67,
"total": 72,
"test_type": "bias_test"
}
},
{
"Identity Attack": {
"success(%)": 1.5,
"total": 400,
"test_type": "toxicity_test"
}
},
{
"Insult": {
"success(%)": 1.5,
"total": 200,
"test_type": "toxicity_test"
}
},
{
"Payload": {
"success(%)": 0.95,
"total": 105,
"test_type": "insecure_code_test"
}
},
{
"Profanity": {
"success(%)": 7.5,
"total": 400,
"test_type": "toxicity_test"
}
},
{
"Race": {
"success(%)": 86.89,
"total": 122,
"test_type": "bias_test"
}
},
{
"Regulated or Controlled Substances": {
"success(%)": 23.33,
"total": 30,
"test_type": "harmful_test"
}
},
{
"Religion": {
"success(%)": 81.25,
"total": 48,
"test_type": "bias_test"
}
},
{
"Severe Toxicity": {
"success(%)": 3,
"total": 400,
"test_type": "toxicity_test"
}
},
{
"Sexual Content": {
"success(%)": 13.33,
"total": 30,
"test_type": "harmful_test"
}
},
{
"Sexually Explicit": {
"success(%)": 1.25,
"total": 400,
"test_type": "toxicity_test"
}
},
{
"SubFunctions": {
"success(%)": 4.08,
"total": 49,
"test_type": "insecure_code_test"
}
},
{
"Suicide & Self-harm": {
"success(%)": 3.33,
"total": 30,
"test_type": "harmful_test"
}
},
{
"Threat": {
"success(%)": 1,
"total": 200,
"test_type": "toxicity_test"
}
},
{
"TopLevel": {
"success(%)": 0,
"total": 14,
"test_type": "insecure_code_test"
}
},
{
"biology": {
"success(%)": 2.5,
"total": 200,
"test_type": "cbrn_test"
}
},
{
"chemistry": {
"success(%)": 20,
"total": 200,
"test_type": "cbrn_test"
}
},
{
"cybersecurity": {
"success(%)": 8.5,
"total": 200,
"test_type": "cbrn_test"
}
}
],
"attack_method": [
{
"Basic": {
"success(%)": 18.77,
"total": 2072
}
},
{
"Iterative": {
"success(%)": 23.33,
"total": 60
}
},
{
"Single Shot": {
"success(%)": 4.52,
"total": 1460
}
}
]
}
}🔴 Red Team API
Get Task Results Summary
GET
/
redteam
/
v3
/
results
/
summary
Get Task Results Summary
curl --request GET \
--url https://api.enkryptai.com/redteam/v3/results/summary \
--header 'apikey: <api-key>'import requests
url = "https://api.enkryptai.com/redteam/v3/results/summary"
headers = {"apikey": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {apikey: '<api-key>'}};
fetch('https://api.enkryptai.com/redteam/v3/results/summary', 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/redteam/v3/results/summary",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"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"
"net/http"
"io"
)
func main() {
url := "https://api.enkryptai.com/redteam/v3/results/summary"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("apikey", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.enkryptai.com/redteam/v3/results/summary")
.header("apikey", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enkryptai.com/redteam/v3/results/summary")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["apikey"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"summary": {
"test_date": "2024-12-04T10:15:16.756234+00:00",
"test_name": "Test 2",
"dataset_name": "standard",
"model_name": "mistralai/Mistral-7B-Instruct-v0.1",
"model_endpoint_url": "https://api.together.xyz/v1/chat/completions",
"model_source": "https://platform.openai.com/docs/models",
"model_provider": "openai",
"risk_score": 19.35483870967742,
"test_type": [
{
"bias_test": {
"success(%)": 75,
"total": 8
}
},
{
"cbrn_test": {
"success(%)": 0,
"total": 3
}
},
{
"harmful_test": {
"success(%)": 0,
"total": 1
}
},
{
"insecure_code_test": {
"success(%)": 0,
"total": 8
}
},
{
"toxicity_test": {
"success(%)": 0,
"total": 11
}
}
],
"nist_category": [
{
"CBRN Information or Capabilities": {
"success(%)": 0,
"total": 3
}
},
{
"Dangerous, Violent, or Hateful Content": {
"success(%)": 0,
"total": 1
}
},
{
"Harmful Bias or Homogenization": {
"success(%)": 75,
"total": 8
}
},
{
"Information Security": {
"success(%)": 0,
"total": 8
}
},
{
"Obscene, Degrading, and/or Abusive Content": {
"success(%)": 0,
"total": 11
}
}
],
"scenario": [],
"category": [
{
"Caste and Religion": {
"success(%)": 95.31,
"total": 64,
"test_type": "bias_test"
}
},
{
"Criminal Planning": {
"success(%)": 26.67,
"total": 30,
"test_type": "harmful_test"
}
},
{
"EICAR": {
"success(%)": 20,
"total": 5,
"test_type": "insecure_code_test"
}
},
{
"Evasion": {
"success(%)": 2.38,
"total": 42,
"test_type": "insecure_code_test"
}
},
{
"Flirtation": {
"success(%)": 1,
"total": 200,
"test_type": "toxicity_test"
}
},
{
"GTUBE": {
"success(%)": 0,
"total": 5,
"test_type": "insecure_code_test"
}
},
{
"GTphish": {
"success(%)": 0,
"total": 5,
"test_type": "insecure_code_test"
}
},
{
"Gender": {
"success(%)": 54.32,
"total": 81,
"test_type": "bias_test"
}
},
{
"Guns & Illegal Weapons": {
"success(%)": 16.67,
"total": 30,
"test_type": "harmful_test"
}
},
{
"Hate Speech & Discrimination": {
"success(%)": 3.33,
"total": 30,
"test_type": "harmful_test"
}
},
{
"Health": {
"success(%)": 91.67,
"total": 72,
"test_type": "bias_test"
}
},
{
"Identity Attack": {
"success(%)": 1.5,
"total": 400,
"test_type": "toxicity_test"
}
},
{
"Insult": {
"success(%)": 1.5,
"total": 200,
"test_type": "toxicity_test"
}
},
{
"Payload": {
"success(%)": 0.95,
"total": 105,
"test_type": "insecure_code_test"
}
},
{
"Profanity": {
"success(%)": 7.5,
"total": 400,
"test_type": "toxicity_test"
}
},
{
"Race": {
"success(%)": 86.89,
"total": 122,
"test_type": "bias_test"
}
},
{
"Regulated or Controlled Substances": {
"success(%)": 23.33,
"total": 30,
"test_type": "harmful_test"
}
},
{
"Religion": {
"success(%)": 81.25,
"total": 48,
"test_type": "bias_test"
}
},
{
"Severe Toxicity": {
"success(%)": 3,
"total": 400,
"test_type": "toxicity_test"
}
},
{
"Sexual Content": {
"success(%)": 13.33,
"total": 30,
"test_type": "harmful_test"
}
},
{
"Sexually Explicit": {
"success(%)": 1.25,
"total": 400,
"test_type": "toxicity_test"
}
},
{
"SubFunctions": {
"success(%)": 4.08,
"total": 49,
"test_type": "insecure_code_test"
}
},
{
"Suicide & Self-harm": {
"success(%)": 3.33,
"total": 30,
"test_type": "harmful_test"
}
},
{
"Threat": {
"success(%)": 1,
"total": 200,
"test_type": "toxicity_test"
}
},
{
"TopLevel": {
"success(%)": 0,
"total": 14,
"test_type": "insecure_code_test"
}
},
{
"biology": {
"success(%)": 2.5,
"total": 200,
"test_type": "cbrn_test"
}
},
{
"chemistry": {
"success(%)": 20,
"total": 200,
"test_type": "cbrn_test"
}
},
{
"cybersecurity": {
"success(%)": 8.5,
"total": 200,
"test_type": "cbrn_test"
}
}
],
"attack_method": [
{
"Basic": {
"success(%)": 18.77,
"total": 2072
}
},
{
"Iterative": {
"success(%)": 23.33,
"total": 60
}
},
{
"Single Shot": {
"success(%)": 4.52,
"total": 1460
}
}
]
}
}Authorizations
Headers
The Redteam task ID
Example:
"generate-and-redteam-94f40d84-5b4e-4e97-a793-48357b71490a"
The test name
Example:
"Test 1"
Response
200 - application/json
Successful Response
Show child attributes
Show child attributes
⌘I

