Skip to main content

Welcome

This section provides an overview of the Red Team job endpoints available for starting and monitoring red teaming tasks. Enkrypt AI Red Team task/job can be started using the following endpoints: https://api.enkryptai.com

Python SDK setup

Python SDK

Red Team Job Endpoints

/redteam/health

The /health endpoint is used to check the health of the Red Team service.
You then get a response like:
JSON

/redteam/v3/model-health

The /v3/model-health endpoint is used to check the health of a model to be used for adding a task.
You then get a response like:
JSON

/redteam/model/model-health

The /model-health endpoint is used to check the health of a saved model to be used for adding a task.
  • X-Enkrypt-Model header: The model saved name to be used.
  • X-Enkrypt-Model-Version header: The model version to be used.
  • No body is required. Response is same as above.
JSON

/redteam/v3/add-custom-task

The /add-custom-task endpoint is used to add a new task or job for starting the red teaming process which also creates the custom dataset needed. To start the task, you need to configure the following information:
  • X-Enkrypt-Policy header: (Optional) The saved Code of Conduct Policy name to be used if you don’t want to supply the dataset_configuration.policy_description in the body.
After adding a task, it will return a task_id, for example:
JSON

/redteam/v3/model/add-custom-task

The /add-custom-task endpoint is used to add a new task or job for starting the red teaming process which also creates the custom dataset needed. This uses a previously saved model name in the header so that you don’t have to supply the target model configuration specifically in the body. To start the task, you need to configure the following information:
  • X-Enkrypt-Model header: The model saved name to be used for this task.
  • X-Enkrypt-Model-Version header: The model version to be used.
  • X-Enkrypt-Policy header: (Optional) The saved Code of Conduct Policy name to be used if you don’t want to supply the dataset_configuration.policy_description in the body.
After adding a task, it will return a task_id, for example:
JSON

/redteam/get-task

The /get-task endpoint is used to get the status of the red teaming task by providing the task_id in header as X-Enkrypt-Task-ID:
Response:
JSON

/redteam/task-status

The /task-status endpoint is used to get the status of the red teaming task by providing the task_id in header as X-Enkrypt-Task-ID:
Response:
JSON

/redteam/v3/results/summary

The /results/summary endpoint is used to get the summary of the red teaming task by providing the task_id in header as X-Enkrypt-Task-ID:
Response:
JSON

/redteam/v3/results/summary/{test_type}

The /results/summary/{test_type} endpoint is used to get the summary of the red teaming task test_type by providing the task_id in header as X-Enkrypt-Task-ID.
Response:
JSON

/redteam/v3/results/details

The /results/details endpoint is used to get the details of the red teaming task by providing the task_id in header as X-Enkrypt-Task-ID.
Response:
JSON

/redteam/v3/results/details/{test_type}

The /results/details/{test_type} endpoint is used to get the details of the red teaming task test_type by providing the task_id in header as X-Enkrypt-Task-ID.
Response:
JSON
The /download-link endpoint is used to get a download link for the red teaming task results. The link expires after 1 week.
  • X-Enkrypt-Test-Name header: The test name to get the download link for.
Response:
JSON

/redteam/findings

The /findings endpoint is used to get the findings of the red teaming task.
Response:
JSON

/redteam/results/risk-mitigation/system-prompt

The /results/risk-mitigation/system-prompt endpoint is used to get the system prompt for risk mitigation based on red teaming test results.
Response:
JSON

/redteam/results/risk-mitigation/guardrails-policy

The /results/risk-mitigation/guardrails-policy endpoint is used to get the guardrails policy for risk mitigation based on red teaming test results.
Response:
JSON

/redteam/list-tasks

The /list-tasks endpoint is used to get the list of all red teaming tasks.
Response:
JSON