Red Team APIs
Add Task with saved model
Red Team API Documentation
Red Team APIs
- GETRedteam Health
- POSTModel Health
- POSTModel Health of saved model
- POSTAdd Task
- POSTAdd 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
Red Team APIs
Add Task with saved model
POST
/
redteam
/
v2
/
model
/
add-task
curl --request POST \
--url https://api.enkryptai.com/redteam/v2/model/add-task \
--header 'Content-Type: application/json' \
--header 'X-Enkrypt-Model: <x-enkrypt-model>' \
--header 'apikey: <api-key>' \
--data '{
"test_name": "Test 1",
"dataset_name": "standard",
"redteam_test_configurations": {
"bias_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"cbrn_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"harmful_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"insecure_code_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"toxicity_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"adv_bias_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"adv_info_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"adv_tool_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"adv_command_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"adv_pii_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"adv_competitor_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
}
}
}'
{
"message": "Redteam task has been added successfully",
"task_id": "redteam-job-6c3babbe-3bc4-4553-a0b7-454df720579f",
"data": {
"test_name": "Test 1",
"dataset_name": "standard",
"redteam_test_configurations": {
"bias_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"cbrn_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"harmful_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"insecure_code_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"toxicity_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"adv_bias_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"adv_info_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"adv_tool_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"adv_command_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"adv_pii_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"adv_competitor_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
}
},
"target_model_configuration": {
"model_name": "meta-llama/Llama-2-13b-chat-hf",
"testing_for": "Copilot",
"model_type": "text_2_text",
"model_version": "v1",
"model_source": "https://together.ai",
"model_provider": "together",
"model_endpoint_url": "https://api.together.xyz/v1/chat/completions",
"system_prompt": "",
"conversation_template": "",
"rate_per_min": 20
}
}
}
Authorizations
Headers
The model saved name. E.g. Test Model
Example:
"Test Model"
Body
application/json
Example:
1
Available options:
basic
Example:
["basic"]
Example:
1
Available options:
basic
Example:
["basic"]
Example:
1
Available options:
basic
Example:
["basic"]
Example:
1
Available options:
basic
Example:
["basic"]
Available options:
encoding
, single_shot
Example:
["encoding"]
Available options:
iterative
Example:
["iterative"]
Example:
1
Available options:
basic
Example:
["basic"]
Example:
1
Available options:
basic
Example:
["basic"]
Example:
1
Available options:
basic
Example:
["basic"]
Example:
1
Available options:
basic
Example:
["basic"]
Example:
1
Available options:
basic
Example:
["basic"]
Example:
1
Available options:
basic
Example:
["basic"]
Example:
1
Available options:
basic
Example:
["basic"]
Available options:
encoding
, single_shot
Example:
["encoding"]
Available options:
iterative
Example:
["iterative"]
Example:
"Test 1"
Example:
"standard"
Response
200 - application/json
Successful Response
Example:
"redteam-job-6c3babbe-3bc4-4553-a0b7-454df720579f"
Example:
"Redteam task has been added successfully"
Example:
1
Example:
1
Example:
1
Example:
1
Example:
1
Example:
1
Example:
1
Example:
1
Example:
1
Example:
1
Example:
1
Example:
"meta-llama/Llama-2-13b-chat-hf"
Example:
"https://api.together.xyz/v1/chat/completions"
Available options:
Copilot
, LLM
, Chatbot
Example:
"Copilot"
Available options:
text_2_text
Example:
"text_2_text"
Example:
"v1"
Example:
"https://together.ai"
Available options:
openai
, together
, huggingface
, groq
, azure_openai
, anthropic
, cohere
, bedrock
, gemini
, ai21
, fireworks
, alibaba
, portkey
, deepseek
, mistral
, llama
, openai_compatible
Example:
"together"
Example:
""
Example:
""
< 100 won't enable async. > 100 will enable async mode. > 200 we can run boosted async (all tests in parallel). Default 20.
Example:
20
Example:
"Test 1"
Example:
"standard"
curl --request POST \
--url https://api.enkryptai.com/redteam/v2/model/add-task \
--header 'Content-Type: application/json' \
--header 'X-Enkrypt-Model: <x-enkrypt-model>' \
--header 'apikey: <api-key>' \
--data '{
"test_name": "Test 1",
"dataset_name": "standard",
"redteam_test_configurations": {
"bias_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"cbrn_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"harmful_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"insecure_code_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"toxicity_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"adv_bias_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"adv_info_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"adv_tool_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"adv_command_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"adv_pii_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"adv_competitor_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
}
}
}'
{
"message": "Redteam task has been added successfully",
"task_id": "redteam-job-6c3babbe-3bc4-4553-a0b7-454df720579f",
"data": {
"test_name": "Test 1",
"dataset_name": "standard",
"redteam_test_configurations": {
"bias_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"cbrn_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"harmful_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"insecure_code_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"toxicity_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"adv_bias_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"adv_info_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"adv_tool_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"adv_command_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"adv_pii_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
},
"adv_competitor_test": {
"sample_percentage": 1,
"attack_methods": {
"basic": [
"basic"
],
"advanced": {
"static": [
"encoding"
],
"dynamic": [
"iterative"
]
}
}
}
},
"target_model_configuration": {
"model_name": "meta-llama/Llama-2-13b-chat-hf",
"testing_for": "Copilot",
"model_type": "text_2_text",
"model_version": "v1",
"model_source": "https://together.ai",
"model_provider": "together",
"model_endpoint_url": "https://api.together.xyz/v1/chat/completions",
"system_prompt": "",
"conversation_template": "",
"rate_per_min": 20
}
}
}