Get findings based on summary
curl --request POST \
--url https://api.enkryptai.com/redteam/findings \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"redteam_summary": {
"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
}
}
]
}
}
}
'import requests
url = "https://api.enkryptai.com/redteam/findings"
payload = { "redteam_summary": { "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
} }]
} } }
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({
redteam_summary: {
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}}
]
}
}
})
};
fetch('https://api.enkryptai.com/redteam/findings', 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/findings",
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([
'redteam_summary' => [
'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
]
]
]
]
]
]),
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/redteam/findings"
payload := strings.NewReader("{\n \"redteam_summary\": {\n \"summary\": {\n \"test_date\": \"2024-12-04T10:15:16.756234+00:00\",\n \"test_name\": \"Test 2\",\n \"dataset_name\": \"standard\",\n \"model_name\": \"mistralai/Mistral-7B-Instruct-v0.1\",\n \"model_endpoint_url\": \"https://api.together.xyz/v1/chat/completions\",\n \"model_source\": \"https://platform.openai.com/docs/models\",\n \"model_provider\": \"openai\",\n \"risk_score\": 19.35483870967742,\n \"test_type\": [\n {\n \"bias_test\": {\n \"success(%)\": 75,\n \"total\": 8\n }\n },\n {\n \"cbrn_test\": {\n \"success(%)\": 0,\n \"total\": 3\n }\n },\n {\n \"harmful_test\": {\n \"success(%)\": 0,\n \"total\": 1\n }\n },\n {\n \"insecure_code_test\": {\n \"success(%)\": 0,\n \"total\": 8\n }\n },\n {\n \"toxicity_test\": {\n \"success(%)\": 0,\n \"total\": 11\n }\n }\n ],\n \"nist_category\": [\n {\n \"CBRN Information or Capabilities\": {\n \"success(%)\": 0,\n \"total\": 3\n }\n },\n {\n \"Dangerous, Violent, or Hateful Content\": {\n \"success(%)\": 0,\n \"total\": 1\n }\n },\n {\n \"Harmful Bias or Homogenization\": {\n \"success(%)\": 75,\n \"total\": 8\n }\n },\n {\n \"Information Security\": {\n \"success(%)\": 0,\n \"total\": 8\n }\n },\n {\n \"Obscene, Degrading, and/or Abusive Content\": {\n \"success(%)\": 0,\n \"total\": 11\n }\n }\n ],\n \"scenario\": [],\n \"category\": [\n {\n \"Caste and Religion\": {\n \"success(%)\": 95.31,\n \"total\": 64,\n \"test_type\": \"bias_test\"\n }\n },\n {\n \"Criminal Planning\": {\n \"success(%)\": 26.67,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"EICAR\": {\n \"success(%)\": 20,\n \"total\": 5,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"Evasion\": {\n \"success(%)\": 2.38,\n \"total\": 42,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"Flirtation\": {\n \"success(%)\": 1,\n \"total\": 200,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"GTUBE\": {\n \"success(%)\": 0,\n \"total\": 5,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"GTphish\": {\n \"success(%)\": 0,\n \"total\": 5,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"Gender\": {\n \"success(%)\": 54.32,\n \"total\": 81,\n \"test_type\": \"bias_test\"\n }\n },\n {\n \"Guns & Illegal Weapons\": {\n \"success(%)\": 16.67,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"Hate Speech & Discrimination\": {\n \"success(%)\": 3.33,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"Health\": {\n \"success(%)\": 91.67,\n \"total\": 72,\n \"test_type\": \"bias_test\"\n }\n },\n {\n \"Identity Attack\": {\n \"success(%)\": 1.5,\n \"total\": 400,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"Insult\": {\n \"success(%)\": 1.5,\n \"total\": 200,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"Payload\": {\n \"success(%)\": 0.95,\n \"total\": 105,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"Profanity\": {\n \"success(%)\": 7.5,\n \"total\": 400,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"Race\": {\n \"success(%)\": 86.89,\n \"total\": 122,\n \"test_type\": \"bias_test\"\n }\n },\n {\n \"Regulated or Controlled Substances\": {\n \"success(%)\": 23.33,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"Religion\": {\n \"success(%)\": 81.25,\n \"total\": 48,\n \"test_type\": \"bias_test\"\n }\n },\n {\n \"Severe Toxicity\": {\n \"success(%)\": 3,\n \"total\": 400,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"Sexual Content\": {\n \"success(%)\": 13.33,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"Sexually Explicit\": {\n \"success(%)\": 1.25,\n \"total\": 400,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"SubFunctions\": {\n \"success(%)\": 4.08,\n \"total\": 49,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"Suicide & Self-harm\": {\n \"success(%)\": 3.33,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"Threat\": {\n \"success(%)\": 1,\n \"total\": 200,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"TopLevel\": {\n \"success(%)\": 0,\n \"total\": 14,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"biology\": {\n \"success(%)\": 2.5,\n \"total\": 200,\n \"test_type\": \"cbrn_test\"\n }\n },\n {\n \"chemistry\": {\n \"success(%)\": 20,\n \"total\": 200,\n \"test_type\": \"cbrn_test\"\n }\n },\n {\n \"cybersecurity\": {\n \"success(%)\": 8.5,\n \"total\": 200,\n \"test_type\": \"cbrn_test\"\n }\n }\n ],\n \"attack_method\": [\n {\n \"Basic\": {\n \"success(%)\": 18.77,\n \"total\": 2072\n }\n },\n {\n \"Iterative\": {\n \"success(%)\": 23.33,\n \"total\": 60\n }\n },\n {\n \"Single Shot\": {\n \"success(%)\": 4.52,\n \"total\": 1460\n }\n }\n ]\n }\n }\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/redteam/findings")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"redteam_summary\": {\n \"summary\": {\n \"test_date\": \"2024-12-04T10:15:16.756234+00:00\",\n \"test_name\": \"Test 2\",\n \"dataset_name\": \"standard\",\n \"model_name\": \"mistralai/Mistral-7B-Instruct-v0.1\",\n \"model_endpoint_url\": \"https://api.together.xyz/v1/chat/completions\",\n \"model_source\": \"https://platform.openai.com/docs/models\",\n \"model_provider\": \"openai\",\n \"risk_score\": 19.35483870967742,\n \"test_type\": [\n {\n \"bias_test\": {\n \"success(%)\": 75,\n \"total\": 8\n }\n },\n {\n \"cbrn_test\": {\n \"success(%)\": 0,\n \"total\": 3\n }\n },\n {\n \"harmful_test\": {\n \"success(%)\": 0,\n \"total\": 1\n }\n },\n {\n \"insecure_code_test\": {\n \"success(%)\": 0,\n \"total\": 8\n }\n },\n {\n \"toxicity_test\": {\n \"success(%)\": 0,\n \"total\": 11\n }\n }\n ],\n \"nist_category\": [\n {\n \"CBRN Information or Capabilities\": {\n \"success(%)\": 0,\n \"total\": 3\n }\n },\n {\n \"Dangerous, Violent, or Hateful Content\": {\n \"success(%)\": 0,\n \"total\": 1\n }\n },\n {\n \"Harmful Bias or Homogenization\": {\n \"success(%)\": 75,\n \"total\": 8\n }\n },\n {\n \"Information Security\": {\n \"success(%)\": 0,\n \"total\": 8\n }\n },\n {\n \"Obscene, Degrading, and/or Abusive Content\": {\n \"success(%)\": 0,\n \"total\": 11\n }\n }\n ],\n \"scenario\": [],\n \"category\": [\n {\n \"Caste and Religion\": {\n \"success(%)\": 95.31,\n \"total\": 64,\n \"test_type\": \"bias_test\"\n }\n },\n {\n \"Criminal Planning\": {\n \"success(%)\": 26.67,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"EICAR\": {\n \"success(%)\": 20,\n \"total\": 5,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"Evasion\": {\n \"success(%)\": 2.38,\n \"total\": 42,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"Flirtation\": {\n \"success(%)\": 1,\n \"total\": 200,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"GTUBE\": {\n \"success(%)\": 0,\n \"total\": 5,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"GTphish\": {\n \"success(%)\": 0,\n \"total\": 5,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"Gender\": {\n \"success(%)\": 54.32,\n \"total\": 81,\n \"test_type\": \"bias_test\"\n }\n },\n {\n \"Guns & Illegal Weapons\": {\n \"success(%)\": 16.67,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"Hate Speech & Discrimination\": {\n \"success(%)\": 3.33,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"Health\": {\n \"success(%)\": 91.67,\n \"total\": 72,\n \"test_type\": \"bias_test\"\n }\n },\n {\n \"Identity Attack\": {\n \"success(%)\": 1.5,\n \"total\": 400,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"Insult\": {\n \"success(%)\": 1.5,\n \"total\": 200,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"Payload\": {\n \"success(%)\": 0.95,\n \"total\": 105,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"Profanity\": {\n \"success(%)\": 7.5,\n \"total\": 400,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"Race\": {\n \"success(%)\": 86.89,\n \"total\": 122,\n \"test_type\": \"bias_test\"\n }\n },\n {\n \"Regulated or Controlled Substances\": {\n \"success(%)\": 23.33,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"Religion\": {\n \"success(%)\": 81.25,\n \"total\": 48,\n \"test_type\": \"bias_test\"\n }\n },\n {\n \"Severe Toxicity\": {\n \"success(%)\": 3,\n \"total\": 400,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"Sexual Content\": {\n \"success(%)\": 13.33,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"Sexually Explicit\": {\n \"success(%)\": 1.25,\n \"total\": 400,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"SubFunctions\": {\n \"success(%)\": 4.08,\n \"total\": 49,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"Suicide & Self-harm\": {\n \"success(%)\": 3.33,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"Threat\": {\n \"success(%)\": 1,\n \"total\": 200,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"TopLevel\": {\n \"success(%)\": 0,\n \"total\": 14,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"biology\": {\n \"success(%)\": 2.5,\n \"total\": 200,\n \"test_type\": \"cbrn_test\"\n }\n },\n {\n \"chemistry\": {\n \"success(%)\": 20,\n \"total\": 200,\n \"test_type\": \"cbrn_test\"\n }\n },\n {\n \"cybersecurity\": {\n \"success(%)\": 8.5,\n \"total\": 200,\n \"test_type\": \"cbrn_test\"\n }\n }\n ],\n \"attack_method\": [\n {\n \"Basic\": {\n \"success(%)\": 18.77,\n \"total\": 2072\n }\n },\n {\n \"Iterative\": {\n \"success(%)\": 23.33,\n \"total\": 60\n }\n },\n {\n \"Single Shot\": {\n \"success(%)\": 4.52,\n \"total\": 1460\n }\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enkryptai.com/redteam/findings")
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 \"redteam_summary\": {\n \"summary\": {\n \"test_date\": \"2024-12-04T10:15:16.756234+00:00\",\n \"test_name\": \"Test 2\",\n \"dataset_name\": \"standard\",\n \"model_name\": \"mistralai/Mistral-7B-Instruct-v0.1\",\n \"model_endpoint_url\": \"https://api.together.xyz/v1/chat/completions\",\n \"model_source\": \"https://platform.openai.com/docs/models\",\n \"model_provider\": \"openai\",\n \"risk_score\": 19.35483870967742,\n \"test_type\": [\n {\n \"bias_test\": {\n \"success(%)\": 75,\n \"total\": 8\n }\n },\n {\n \"cbrn_test\": {\n \"success(%)\": 0,\n \"total\": 3\n }\n },\n {\n \"harmful_test\": {\n \"success(%)\": 0,\n \"total\": 1\n }\n },\n {\n \"insecure_code_test\": {\n \"success(%)\": 0,\n \"total\": 8\n }\n },\n {\n \"toxicity_test\": {\n \"success(%)\": 0,\n \"total\": 11\n }\n }\n ],\n \"nist_category\": [\n {\n \"CBRN Information or Capabilities\": {\n \"success(%)\": 0,\n \"total\": 3\n }\n },\n {\n \"Dangerous, Violent, or Hateful Content\": {\n \"success(%)\": 0,\n \"total\": 1\n }\n },\n {\n \"Harmful Bias or Homogenization\": {\n \"success(%)\": 75,\n \"total\": 8\n }\n },\n {\n \"Information Security\": {\n \"success(%)\": 0,\n \"total\": 8\n }\n },\n {\n \"Obscene, Degrading, and/or Abusive Content\": {\n \"success(%)\": 0,\n \"total\": 11\n }\n }\n ],\n \"scenario\": [],\n \"category\": [\n {\n \"Caste and Religion\": {\n \"success(%)\": 95.31,\n \"total\": 64,\n \"test_type\": \"bias_test\"\n }\n },\n {\n \"Criminal Planning\": {\n \"success(%)\": 26.67,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"EICAR\": {\n \"success(%)\": 20,\n \"total\": 5,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"Evasion\": {\n \"success(%)\": 2.38,\n \"total\": 42,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"Flirtation\": {\n \"success(%)\": 1,\n \"total\": 200,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"GTUBE\": {\n \"success(%)\": 0,\n \"total\": 5,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"GTphish\": {\n \"success(%)\": 0,\n \"total\": 5,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"Gender\": {\n \"success(%)\": 54.32,\n \"total\": 81,\n \"test_type\": \"bias_test\"\n }\n },\n {\n \"Guns & Illegal Weapons\": {\n \"success(%)\": 16.67,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"Hate Speech & Discrimination\": {\n \"success(%)\": 3.33,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"Health\": {\n \"success(%)\": 91.67,\n \"total\": 72,\n \"test_type\": \"bias_test\"\n }\n },\n {\n \"Identity Attack\": {\n \"success(%)\": 1.5,\n \"total\": 400,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"Insult\": {\n \"success(%)\": 1.5,\n \"total\": 200,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"Payload\": {\n \"success(%)\": 0.95,\n \"total\": 105,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"Profanity\": {\n \"success(%)\": 7.5,\n \"total\": 400,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"Race\": {\n \"success(%)\": 86.89,\n \"total\": 122,\n \"test_type\": \"bias_test\"\n }\n },\n {\n \"Regulated or Controlled Substances\": {\n \"success(%)\": 23.33,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"Religion\": {\n \"success(%)\": 81.25,\n \"total\": 48,\n \"test_type\": \"bias_test\"\n }\n },\n {\n \"Severe Toxicity\": {\n \"success(%)\": 3,\n \"total\": 400,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"Sexual Content\": {\n \"success(%)\": 13.33,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"Sexually Explicit\": {\n \"success(%)\": 1.25,\n \"total\": 400,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"SubFunctions\": {\n \"success(%)\": 4.08,\n \"total\": 49,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"Suicide & Self-harm\": {\n \"success(%)\": 3.33,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"Threat\": {\n \"success(%)\": 1,\n \"total\": 200,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"TopLevel\": {\n \"success(%)\": 0,\n \"total\": 14,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"biology\": {\n \"success(%)\": 2.5,\n \"total\": 200,\n \"test_type\": \"cbrn_test\"\n }\n },\n {\n \"chemistry\": {\n \"success(%)\": 20,\n \"total\": 200,\n \"test_type\": \"cbrn_test\"\n }\n },\n {\n \"cybersecurity\": {\n \"success(%)\": 8.5,\n \"total\": 200,\n \"test_type\": \"cbrn_test\"\n }\n }\n ],\n \"attack_method\": [\n {\n \"Basic\": {\n \"success(%)\": 18.77,\n \"total\": 2072\n }\n },\n {\n \"Iterative\": {\n \"success(%)\": 23.33,\n \"total\": 60\n }\n },\n {\n \"Single Shot\": {\n \"success(%)\": 4.52,\n \"total\": 1460\n }\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"key_findings": [
{
"text": "Jamba-1.5-Mini-Enkrypt-Aligned-0 shows severe bias vulnerabilities, especially in caste, religion, race, and gender, far exceeding typical benchmarks and posing significant regulatory and reputational risks."
},
{
"text": "Iterative and basic attack methods are notably more effective at eliciting unsafe outputs from Jamba-1.5-Mini-Enkrypt-Aligned-0 than single-shot prompts, indicating susceptibility to persistent adversarial probing."
},
{
"text": "The model demonstrates moderate risk in criminal planning, regulated substances, and guns/illegal weapons, suggesting it can be manipulated to provide guidance on illicit activities."
},
{
"text": "CBRN and chemistry-related risks are present but below industry concern thresholds; however, even low success rates in these areas warrant ongoing monitoring due to potential for high-impact misuse."
},
{
"text": "Jamba-1.5-Mini-Enkrypt-Aligned-0 is relatively robust against insecure code and direct toxicity, but isolated successes in these categories mean residual risks remain and should not be ignored."
}
],
"message": "Key Findings have been generated successfully"
}๐ด Red Team API
Get findings based on summary
Analyzes the provided red team summary and returns a list of key findings highlighting vulnerabilities, risks, and areas for ongoing monitoring.
POST
/
redteam
/
findings
Get findings based on summary
curl --request POST \
--url https://api.enkryptai.com/redteam/findings \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"redteam_summary": {
"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
}
}
]
}
}
}
'import requests
url = "https://api.enkryptai.com/redteam/findings"
payload = { "redteam_summary": { "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
} }]
} } }
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({
redteam_summary: {
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}}
]
}
}
})
};
fetch('https://api.enkryptai.com/redteam/findings', 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/findings",
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([
'redteam_summary' => [
'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
]
]
]
]
]
]),
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/redteam/findings"
payload := strings.NewReader("{\n \"redteam_summary\": {\n \"summary\": {\n \"test_date\": \"2024-12-04T10:15:16.756234+00:00\",\n \"test_name\": \"Test 2\",\n \"dataset_name\": \"standard\",\n \"model_name\": \"mistralai/Mistral-7B-Instruct-v0.1\",\n \"model_endpoint_url\": \"https://api.together.xyz/v1/chat/completions\",\n \"model_source\": \"https://platform.openai.com/docs/models\",\n \"model_provider\": \"openai\",\n \"risk_score\": 19.35483870967742,\n \"test_type\": [\n {\n \"bias_test\": {\n \"success(%)\": 75,\n \"total\": 8\n }\n },\n {\n \"cbrn_test\": {\n \"success(%)\": 0,\n \"total\": 3\n }\n },\n {\n \"harmful_test\": {\n \"success(%)\": 0,\n \"total\": 1\n }\n },\n {\n \"insecure_code_test\": {\n \"success(%)\": 0,\n \"total\": 8\n }\n },\n {\n \"toxicity_test\": {\n \"success(%)\": 0,\n \"total\": 11\n }\n }\n ],\n \"nist_category\": [\n {\n \"CBRN Information or Capabilities\": {\n \"success(%)\": 0,\n \"total\": 3\n }\n },\n {\n \"Dangerous, Violent, or Hateful Content\": {\n \"success(%)\": 0,\n \"total\": 1\n }\n },\n {\n \"Harmful Bias or Homogenization\": {\n \"success(%)\": 75,\n \"total\": 8\n }\n },\n {\n \"Information Security\": {\n \"success(%)\": 0,\n \"total\": 8\n }\n },\n {\n \"Obscene, Degrading, and/or Abusive Content\": {\n \"success(%)\": 0,\n \"total\": 11\n }\n }\n ],\n \"scenario\": [],\n \"category\": [\n {\n \"Caste and Religion\": {\n \"success(%)\": 95.31,\n \"total\": 64,\n \"test_type\": \"bias_test\"\n }\n },\n {\n \"Criminal Planning\": {\n \"success(%)\": 26.67,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"EICAR\": {\n \"success(%)\": 20,\n \"total\": 5,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"Evasion\": {\n \"success(%)\": 2.38,\n \"total\": 42,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"Flirtation\": {\n \"success(%)\": 1,\n \"total\": 200,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"GTUBE\": {\n \"success(%)\": 0,\n \"total\": 5,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"GTphish\": {\n \"success(%)\": 0,\n \"total\": 5,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"Gender\": {\n \"success(%)\": 54.32,\n \"total\": 81,\n \"test_type\": \"bias_test\"\n }\n },\n {\n \"Guns & Illegal Weapons\": {\n \"success(%)\": 16.67,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"Hate Speech & Discrimination\": {\n \"success(%)\": 3.33,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"Health\": {\n \"success(%)\": 91.67,\n \"total\": 72,\n \"test_type\": \"bias_test\"\n }\n },\n {\n \"Identity Attack\": {\n \"success(%)\": 1.5,\n \"total\": 400,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"Insult\": {\n \"success(%)\": 1.5,\n \"total\": 200,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"Payload\": {\n \"success(%)\": 0.95,\n \"total\": 105,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"Profanity\": {\n \"success(%)\": 7.5,\n \"total\": 400,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"Race\": {\n \"success(%)\": 86.89,\n \"total\": 122,\n \"test_type\": \"bias_test\"\n }\n },\n {\n \"Regulated or Controlled Substances\": {\n \"success(%)\": 23.33,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"Religion\": {\n \"success(%)\": 81.25,\n \"total\": 48,\n \"test_type\": \"bias_test\"\n }\n },\n {\n \"Severe Toxicity\": {\n \"success(%)\": 3,\n \"total\": 400,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"Sexual Content\": {\n \"success(%)\": 13.33,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"Sexually Explicit\": {\n \"success(%)\": 1.25,\n \"total\": 400,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"SubFunctions\": {\n \"success(%)\": 4.08,\n \"total\": 49,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"Suicide & Self-harm\": {\n \"success(%)\": 3.33,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"Threat\": {\n \"success(%)\": 1,\n \"total\": 200,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"TopLevel\": {\n \"success(%)\": 0,\n \"total\": 14,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"biology\": {\n \"success(%)\": 2.5,\n \"total\": 200,\n \"test_type\": \"cbrn_test\"\n }\n },\n {\n \"chemistry\": {\n \"success(%)\": 20,\n \"total\": 200,\n \"test_type\": \"cbrn_test\"\n }\n },\n {\n \"cybersecurity\": {\n \"success(%)\": 8.5,\n \"total\": 200,\n \"test_type\": \"cbrn_test\"\n }\n }\n ],\n \"attack_method\": [\n {\n \"Basic\": {\n \"success(%)\": 18.77,\n \"total\": 2072\n }\n },\n {\n \"Iterative\": {\n \"success(%)\": 23.33,\n \"total\": 60\n }\n },\n {\n \"Single Shot\": {\n \"success(%)\": 4.52,\n \"total\": 1460\n }\n }\n ]\n }\n }\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/redteam/findings")
.header("apikey", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"redteam_summary\": {\n \"summary\": {\n \"test_date\": \"2024-12-04T10:15:16.756234+00:00\",\n \"test_name\": \"Test 2\",\n \"dataset_name\": \"standard\",\n \"model_name\": \"mistralai/Mistral-7B-Instruct-v0.1\",\n \"model_endpoint_url\": \"https://api.together.xyz/v1/chat/completions\",\n \"model_source\": \"https://platform.openai.com/docs/models\",\n \"model_provider\": \"openai\",\n \"risk_score\": 19.35483870967742,\n \"test_type\": [\n {\n \"bias_test\": {\n \"success(%)\": 75,\n \"total\": 8\n }\n },\n {\n \"cbrn_test\": {\n \"success(%)\": 0,\n \"total\": 3\n }\n },\n {\n \"harmful_test\": {\n \"success(%)\": 0,\n \"total\": 1\n }\n },\n {\n \"insecure_code_test\": {\n \"success(%)\": 0,\n \"total\": 8\n }\n },\n {\n \"toxicity_test\": {\n \"success(%)\": 0,\n \"total\": 11\n }\n }\n ],\n \"nist_category\": [\n {\n \"CBRN Information or Capabilities\": {\n \"success(%)\": 0,\n \"total\": 3\n }\n },\n {\n \"Dangerous, Violent, or Hateful Content\": {\n \"success(%)\": 0,\n \"total\": 1\n }\n },\n {\n \"Harmful Bias or Homogenization\": {\n \"success(%)\": 75,\n \"total\": 8\n }\n },\n {\n \"Information Security\": {\n \"success(%)\": 0,\n \"total\": 8\n }\n },\n {\n \"Obscene, Degrading, and/or Abusive Content\": {\n \"success(%)\": 0,\n \"total\": 11\n }\n }\n ],\n \"scenario\": [],\n \"category\": [\n {\n \"Caste and Religion\": {\n \"success(%)\": 95.31,\n \"total\": 64,\n \"test_type\": \"bias_test\"\n }\n },\n {\n \"Criminal Planning\": {\n \"success(%)\": 26.67,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"EICAR\": {\n \"success(%)\": 20,\n \"total\": 5,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"Evasion\": {\n \"success(%)\": 2.38,\n \"total\": 42,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"Flirtation\": {\n \"success(%)\": 1,\n \"total\": 200,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"GTUBE\": {\n \"success(%)\": 0,\n \"total\": 5,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"GTphish\": {\n \"success(%)\": 0,\n \"total\": 5,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"Gender\": {\n \"success(%)\": 54.32,\n \"total\": 81,\n \"test_type\": \"bias_test\"\n }\n },\n {\n \"Guns & Illegal Weapons\": {\n \"success(%)\": 16.67,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"Hate Speech & Discrimination\": {\n \"success(%)\": 3.33,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"Health\": {\n \"success(%)\": 91.67,\n \"total\": 72,\n \"test_type\": \"bias_test\"\n }\n },\n {\n \"Identity Attack\": {\n \"success(%)\": 1.5,\n \"total\": 400,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"Insult\": {\n \"success(%)\": 1.5,\n \"total\": 200,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"Payload\": {\n \"success(%)\": 0.95,\n \"total\": 105,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"Profanity\": {\n \"success(%)\": 7.5,\n \"total\": 400,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"Race\": {\n \"success(%)\": 86.89,\n \"total\": 122,\n \"test_type\": \"bias_test\"\n }\n },\n {\n \"Regulated or Controlled Substances\": {\n \"success(%)\": 23.33,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"Religion\": {\n \"success(%)\": 81.25,\n \"total\": 48,\n \"test_type\": \"bias_test\"\n }\n },\n {\n \"Severe Toxicity\": {\n \"success(%)\": 3,\n \"total\": 400,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"Sexual Content\": {\n \"success(%)\": 13.33,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"Sexually Explicit\": {\n \"success(%)\": 1.25,\n \"total\": 400,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"SubFunctions\": {\n \"success(%)\": 4.08,\n \"total\": 49,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"Suicide & Self-harm\": {\n \"success(%)\": 3.33,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"Threat\": {\n \"success(%)\": 1,\n \"total\": 200,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"TopLevel\": {\n \"success(%)\": 0,\n \"total\": 14,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"biology\": {\n \"success(%)\": 2.5,\n \"total\": 200,\n \"test_type\": \"cbrn_test\"\n }\n },\n {\n \"chemistry\": {\n \"success(%)\": 20,\n \"total\": 200,\n \"test_type\": \"cbrn_test\"\n }\n },\n {\n \"cybersecurity\": {\n \"success(%)\": 8.5,\n \"total\": 200,\n \"test_type\": \"cbrn_test\"\n }\n }\n ],\n \"attack_method\": [\n {\n \"Basic\": {\n \"success(%)\": 18.77,\n \"total\": 2072\n }\n },\n {\n \"Iterative\": {\n \"success(%)\": 23.33,\n \"total\": 60\n }\n },\n {\n \"Single Shot\": {\n \"success(%)\": 4.52,\n \"total\": 1460\n }\n }\n ]\n }\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.enkryptai.com/redteam/findings")
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 \"redteam_summary\": {\n \"summary\": {\n \"test_date\": \"2024-12-04T10:15:16.756234+00:00\",\n \"test_name\": \"Test 2\",\n \"dataset_name\": \"standard\",\n \"model_name\": \"mistralai/Mistral-7B-Instruct-v0.1\",\n \"model_endpoint_url\": \"https://api.together.xyz/v1/chat/completions\",\n \"model_source\": \"https://platform.openai.com/docs/models\",\n \"model_provider\": \"openai\",\n \"risk_score\": 19.35483870967742,\n \"test_type\": [\n {\n \"bias_test\": {\n \"success(%)\": 75,\n \"total\": 8\n }\n },\n {\n \"cbrn_test\": {\n \"success(%)\": 0,\n \"total\": 3\n }\n },\n {\n \"harmful_test\": {\n \"success(%)\": 0,\n \"total\": 1\n }\n },\n {\n \"insecure_code_test\": {\n \"success(%)\": 0,\n \"total\": 8\n }\n },\n {\n \"toxicity_test\": {\n \"success(%)\": 0,\n \"total\": 11\n }\n }\n ],\n \"nist_category\": [\n {\n \"CBRN Information or Capabilities\": {\n \"success(%)\": 0,\n \"total\": 3\n }\n },\n {\n \"Dangerous, Violent, or Hateful Content\": {\n \"success(%)\": 0,\n \"total\": 1\n }\n },\n {\n \"Harmful Bias or Homogenization\": {\n \"success(%)\": 75,\n \"total\": 8\n }\n },\n {\n \"Information Security\": {\n \"success(%)\": 0,\n \"total\": 8\n }\n },\n {\n \"Obscene, Degrading, and/or Abusive Content\": {\n \"success(%)\": 0,\n \"total\": 11\n }\n }\n ],\n \"scenario\": [],\n \"category\": [\n {\n \"Caste and Religion\": {\n \"success(%)\": 95.31,\n \"total\": 64,\n \"test_type\": \"bias_test\"\n }\n },\n {\n \"Criminal Planning\": {\n \"success(%)\": 26.67,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"EICAR\": {\n \"success(%)\": 20,\n \"total\": 5,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"Evasion\": {\n \"success(%)\": 2.38,\n \"total\": 42,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"Flirtation\": {\n \"success(%)\": 1,\n \"total\": 200,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"GTUBE\": {\n \"success(%)\": 0,\n \"total\": 5,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"GTphish\": {\n \"success(%)\": 0,\n \"total\": 5,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"Gender\": {\n \"success(%)\": 54.32,\n \"total\": 81,\n \"test_type\": \"bias_test\"\n }\n },\n {\n \"Guns & Illegal Weapons\": {\n \"success(%)\": 16.67,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"Hate Speech & Discrimination\": {\n \"success(%)\": 3.33,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"Health\": {\n \"success(%)\": 91.67,\n \"total\": 72,\n \"test_type\": \"bias_test\"\n }\n },\n {\n \"Identity Attack\": {\n \"success(%)\": 1.5,\n \"total\": 400,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"Insult\": {\n \"success(%)\": 1.5,\n \"total\": 200,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"Payload\": {\n \"success(%)\": 0.95,\n \"total\": 105,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"Profanity\": {\n \"success(%)\": 7.5,\n \"total\": 400,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"Race\": {\n \"success(%)\": 86.89,\n \"total\": 122,\n \"test_type\": \"bias_test\"\n }\n },\n {\n \"Regulated or Controlled Substances\": {\n \"success(%)\": 23.33,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"Religion\": {\n \"success(%)\": 81.25,\n \"total\": 48,\n \"test_type\": \"bias_test\"\n }\n },\n {\n \"Severe Toxicity\": {\n \"success(%)\": 3,\n \"total\": 400,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"Sexual Content\": {\n \"success(%)\": 13.33,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"Sexually Explicit\": {\n \"success(%)\": 1.25,\n \"total\": 400,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"SubFunctions\": {\n \"success(%)\": 4.08,\n \"total\": 49,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"Suicide & Self-harm\": {\n \"success(%)\": 3.33,\n \"total\": 30,\n \"test_type\": \"harmful_test\"\n }\n },\n {\n \"Threat\": {\n \"success(%)\": 1,\n \"total\": 200,\n \"test_type\": \"toxicity_test\"\n }\n },\n {\n \"TopLevel\": {\n \"success(%)\": 0,\n \"total\": 14,\n \"test_type\": \"insecure_code_test\"\n }\n },\n {\n \"biology\": {\n \"success(%)\": 2.5,\n \"total\": 200,\n \"test_type\": \"cbrn_test\"\n }\n },\n {\n \"chemistry\": {\n \"success(%)\": 20,\n \"total\": 200,\n \"test_type\": \"cbrn_test\"\n }\n },\n {\n \"cybersecurity\": {\n \"success(%)\": 8.5,\n \"total\": 200,\n \"test_type\": \"cbrn_test\"\n }\n }\n ],\n \"attack_method\": [\n {\n \"Basic\": {\n \"success(%)\": 18.77,\n \"total\": 2072\n }\n },\n {\n \"Iterative\": {\n \"success(%)\": 23.33,\n \"total\": 60\n }\n },\n {\n \"Single Shot\": {\n \"success(%)\": 4.52,\n \"total\": 1460\n }\n }\n ]\n }\n }\n}"
response = http.request(request)
puts response.read_body{
"key_findings": [
{
"text": "Jamba-1.5-Mini-Enkrypt-Aligned-0 shows severe bias vulnerabilities, especially in caste, religion, race, and gender, far exceeding typical benchmarks and posing significant regulatory and reputational risks."
},
{
"text": "Iterative and basic attack methods are notably more effective at eliciting unsafe outputs from Jamba-1.5-Mini-Enkrypt-Aligned-0 than single-shot prompts, indicating susceptibility to persistent adversarial probing."
},
{
"text": "The model demonstrates moderate risk in criminal planning, regulated substances, and guns/illegal weapons, suggesting it can be manipulated to provide guidance on illicit activities."
},
{
"text": "CBRN and chemistry-related risks are present but below industry concern thresholds; however, even low success rates in these areas warrant ongoing monitoring due to potential for high-impact misuse."
},
{
"text": "Jamba-1.5-Mini-Enkrypt-Aligned-0 is relatively robust against insecure code and direct toxicity, but isolated successes in these categories mean residual risks remain and should not be ignored."
}
],
"message": "Key Findings have been generated successfully"
}Authorizations
Body
application/json
Show child attributes
Show child attributes
Example:
{
"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 }
}
]
}
}
Get Task Results Details of a specific test typeGenerate a system prompt for risk mitigation based on red teaming test results
โI

