Red Team API Documentation
Red Team APIs
- GETRedteam Health
- POSTModel Health
- POSTModel Health of saved model
- POSTAdd Task
- POSTAdd Task with saved model
- POSTAdd Custom Task
- POSTAdd Custom Task with saved model
- PATCHCancel Task
- GETGet Task
- GETGet Task Status
- GETGet Task Results Summary
- GETGet Task Results Summary of a specific test type
- GETGet Task Results Details
- GETGet Task Results Details of a specific test type
- GETGet List of Tasks
Add Task
curl --request POST \
--url https://api.enkryptai.com/redteam/v2/add-task \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '{
"test_name": "Test 1",
"dataset_name": "standard",
"redteam_test_configurations": {
"bias_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
]
}
},
"cbrn_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
]
}
},
"harmful_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
]
}
},
"insecure_code_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
]
}
},
"toxicity_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
]
}
},
"adv_bias_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
]
}
},
"adv_info_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
]
}
},
"adv_tool_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
]
}
},
"adv_command_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
]
}
},
"adv_pii_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
]
}
},
"adv_competitor_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
]
}
}
},
"target_model_configuration": {
"model_name": "mistralai/Mistral-7B-Instruct-v0.1",
"testing_for": "Copilot",
"model_version": "v1",
"model_source": "https://together.ai",
"model_provider": "together",
"model_endpoint_url": "https://api.together.xyz/v1/chat/completions",
"model_api_key": "ABCDE12345678900",
"system_prompt": "",
"rate_per_min": 20,
"input_modalities": [
"text"
],
"output_modalities": [
"text"
],
"tools": [
{
"name": "web_search",
"description": "The tool web search is used to search the web for information related to finance."
}
]
}
}'
{
"status": "Success",
"message": "Redteam task has been added successfully",
"task_id": "red-team-6c3babbe-3bc4-4553-a0b7-454df720579f",
"data": {
"status": "Success",
"message": "Redteam task has been added successfully",
"task_id": "red-team-dd42eac8-ce07-4e79-8ee2-8b7dba083a76",
"data": {
"id": "9a010225-ca18-456b-9513-xxxxxxx",
"test_name": "Test Old v2",
"created_at": "2025-04-16T16:33:36.009729+00:00",
"job_id": "red-team-dd42eac8-ce07-4e79-8ee2-8b7dba083a76",
"dataset_name": "standard",
"model_name": "Mistral-7B-Instruct-v0.1",
"model_config": {
"testing_for": "foundationModels",
"model_name": "mistralai/Mistral-7B-Instruct-v0.1",
"rpm": null,
"model_version": null,
"system_prompt": "",
"conversation_template": null,
"model_source": null,
"model_provider": "together",
"model_endpoint_url": "https://api.together.xyz/v1/chat/completions",
"rate_per_min": 10,
"input_modalities": null,
"output_modalities": null,
"custom_headers": null,
"custom_payload": null,
"custom_curl_command": null,
"custom_response_content_type": null,
"custom_response_format": null,
"tools": null,
"metadata": null
},
"redteam_config": {
"harmful_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
]
}
}
},
"status": "Queued",
"location": "9a010225-ca18-456b-9513-xxxxxxx/red-team-dd42eac8-ce07-4e79-8ee2-8b7dba083a76",
"run_name": null,
"project_name": "default",
"actioner_email": null,
"test_version": 3,
"model_saved_name": null,
"model_version": null,
"coc_policy_name": null
}
}
}
Authorizations
Body
1
basic
["basic"]
{
"sample_percentage": 1,
"attack_methods": { "basic": ["basic"] }
}
1
basic
["basic"]
{
"sample_percentage": 1,
"attack_methods": { "basic": ["basic"] }
}
1
basic
["basic"]
{
"sample_percentage": 1,
"attack_methods": { "basic": ["basic"] }
}
1
basic
["basic"]
{
"sample_percentage": 1,
"attack_methods": { "basic": ["basic"] }
}
1
basic
["basic"]
{
"sample_percentage": 1,
"attack_methods": { "basic": ["basic"] }
}
1
basic
["basic"]
{
"sample_percentage": 1,
"attack_methods": { "basic": ["basic"] }
}
1
basic
["basic"]
{
"sample_percentage": 1,
"attack_methods": { "basic": ["basic"] }
}
1
basic
["basic"]
{
"sample_percentage": 1,
"attack_methods": { "basic": ["basic"] }
}
1
basic
["basic"]
{
"sample_percentage": 1,
"attack_methods": { "basic": ["basic"] }
}
1
basic
["basic"]
{
"sample_percentage": 1,
"attack_methods": { "basic": ["basic"] }
}
1
basic
["basic"]
{
"sample_percentage": 1,
"attack_methods": { "basic": ["basic"] }
}
"https://api.together.xyz/v1/chat/completions"
"mistralai/Mistral-7B-Instruct-v0.1"
foundationModels
, chatbotsAndCopilots
, agents
"Copilot"
"v1"
"https://together.ai"
openai
, together
, huggingface
, groq
, azure_openai
, anthropic
, cohere
, bedrock
, gemini
, ai21
, fireworks
, alibaba
, portkey
, deepseek
, mistral
, llama
, openai_compatible
"together"
"ABCDE12345678900"
""
< 100 won't enable async. > 100 will enable async mode. > 200 we can run boosted async (all tests in parallel). Default 20.
20
Types of input that the model can process
text
, image
, audio
["text"]
Types of output that the model can generate
text
["text"]
Array of tools available to the model
[
{
"name": "web_search",
"description": "The tool web search is used to search the web for information related to finance."
}
]
"Test 1"
"standard"
Response
"red-team-6c3babbe-3bc4-4553-a0b7-454df720579f"
Status of the task
Success
, Failed
"Success"
"Redteam task has been added successfully"
"Test 1"
"standard"
"2025-04-16T16:33:36.009729+00:00"
"mistralai/Mistral-7B-Instruct-v0.1"
"9a010225-ca18-456b-9513-xxxxxxx"
Status of the task
Queued
, Running
, Finished
, Failed
"Queued"
{
"sample_percentage": 1,
"attack_methods": { "basic": ["basic"] }
}
{
"sample_percentage": 1,
"attack_methods": { "basic": ["basic"] }
}
1
{
"sample_percentage": 1,
"attack_methods": { "basic": ["basic"] }
}
1
{
"sample_percentage": 1,
"attack_methods": { "basic": ["basic"] }
}
1
{
"sample_percentage": 1,
"attack_methods": { "basic": ["basic"] }
}
1
{
"sample_percentage": 1,
"attack_methods": { "basic": ["basic"] }
}
1
{
"sample_percentage": 1,
"attack_methods": { "basic": ["basic"] }
}
1
{
"sample_percentage": 1,
"attack_methods": { "basic": ["basic"] }
}
1
{
"sample_percentage": 1,
"attack_methods": { "basic": ["basic"] }
}
1
{
"sample_percentage": 1,
"attack_methods": { "basic": ["basic"] }
}
1
{
"sample_percentage": 1,
"attack_methods": { "basic": ["basic"] }
}
"https://api.together.xyz/v1/chat/completions"
"mistralai/Mistral-7B-Instruct-v0.1"
foundationModels
, chatbotsAndCopilots
, agents
"Copilot"
"v1"
"https://together.ai"
openai
, together
, huggingface
, groq
, azure_openai
, anthropic
, cohere
, bedrock
, gemini
, ai21
, fireworks
, alibaba
, portkey
, deepseek
, mistral
, llama
, openai_compatible
, custom
"together"
""
< 100 won't enable async. > 100 will enable async mode. > 200 we can run boosted async (all tests in parallel). Default 20.
20
{
"status": "Success",
"message": "Redteam task has been added successfully",
"task_id": "red-team-dd42eac8-ce07-4e79-8ee2-8b7dba083a76",
"data": {
"id": "9a010225-ca18-456b-9513-xxxxxxx",
"test_name": "Test Old v2",
"created_at": "2025-04-16T16:33:36.009729+00:00",
"job_id": "red-team-dd42eac8-ce07-4e79-8ee2-8b7dba083a76",
"dataset_name": "standard",
"model_name": "Mistral-7B-Instruct-v0.1",
"model_config": {
"testing_for": "foundationModels",
"model_name": "mistralai/Mistral-7B-Instruct-v0.1",
"rpm": null,
"model_version": null,
"system_prompt": "",
"conversation_template": null,
"model_source": null,
"model_provider": "together",
"model_endpoint_url": "https://api.together.xyz/v1/chat/completions",
"rate_per_min": 10,
"input_modalities": null,
"output_modalities": null,
"custom_headers": null,
"custom_payload": null,
"custom_curl_command": null,
"custom_response_content_type": null,
"custom_response_format": null,
"tools": null,
"metadata": null
},
"redteam_config": {
"harmful_test": {
"sample_percentage": 1,
"attack_methods": { "basic": ["basic"] }
}
},
"status": "Queued",
"location": "9a010225-ca18-456b-9513-xxxxxxx/red-team-dd42eac8-ce07-4e79-8ee2-8b7dba083a76",
"run_name": null,
"project_name": "default",
"actioner_email": null,
"test_version": 3,
"model_saved_name": null,
"model_version": null,
"coc_policy_name": null
}
}
curl --request POST \
--url https://api.enkryptai.com/redteam/v2/add-task \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '{
"test_name": "Test 1",
"dataset_name": "standard",
"redteam_test_configurations": {
"bias_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
]
}
},
"cbrn_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
]
}
},
"harmful_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
]
}
},
"insecure_code_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
]
}
},
"toxicity_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
]
}
},
"adv_bias_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
]
}
},
"adv_info_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
]
}
},
"adv_tool_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
]
}
},
"adv_command_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
]
}
},
"adv_pii_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
]
}
},
"adv_competitor_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
]
}
}
},
"target_model_configuration": {
"model_name": "mistralai/Mistral-7B-Instruct-v0.1",
"testing_for": "Copilot",
"model_version": "v1",
"model_source": "https://together.ai",
"model_provider": "together",
"model_endpoint_url": "https://api.together.xyz/v1/chat/completions",
"model_api_key": "ABCDE12345678900",
"system_prompt": "",
"rate_per_min": 20,
"input_modalities": [
"text"
],
"output_modalities": [
"text"
],
"tools": [
{
"name": "web_search",
"description": "The tool web search is used to search the web for information related to finance."
}
]
}
}'
{
"status": "Success",
"message": "Redteam task has been added successfully",
"task_id": "red-team-6c3babbe-3bc4-4553-a0b7-454df720579f",
"data": {
"status": "Success",
"message": "Redteam task has been added successfully",
"task_id": "red-team-dd42eac8-ce07-4e79-8ee2-8b7dba083a76",
"data": {
"id": "9a010225-ca18-456b-9513-xxxxxxx",
"test_name": "Test Old v2",
"created_at": "2025-04-16T16:33:36.009729+00:00",
"job_id": "red-team-dd42eac8-ce07-4e79-8ee2-8b7dba083a76",
"dataset_name": "standard",
"model_name": "Mistral-7B-Instruct-v0.1",
"model_config": {
"testing_for": "foundationModels",
"model_name": "mistralai/Mistral-7B-Instruct-v0.1",
"rpm": null,
"model_version": null,
"system_prompt": "",
"conversation_template": null,
"model_source": null,
"model_provider": "together",
"model_endpoint_url": "https://api.together.xyz/v1/chat/completions",
"rate_per_min": 10,
"input_modalities": null,
"output_modalities": null,
"custom_headers": null,
"custom_payload": null,
"custom_curl_command": null,
"custom_response_content_type": null,
"custom_response_format": null,
"tools": null,
"metadata": null
},
"redteam_config": {
"harmful_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
]
}
}
},
"status": "Queued",
"location": "9a010225-ca18-456b-9513-xxxxxxx/red-team-dd42eac8-ce07-4e79-8ee2-8b7dba083a76",
"run_name": null,
"project_name": "default",
"actioner_email": null,
"test_version": 3,
"model_saved_name": null,
"model_version": null,
"coc_policy_name": null
}
}
}