POST
/
redteam
/
v2
/
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

apikey
string
header
required

Body

application/json
redteam_test_configurations
object
required
target_model_configuration
object
required
test_name
string
Example:

"Test 1"

dataset_name
string
Example:

"standard"

Response

200 - application/json
Successful Response
task_id
string
required
Example:

"red-team-6c3babbe-3bc4-4553-a0b7-454df720579f"

status
enum<string>

Status of the task

Available options:
Success,
Failed
Example:

"Success"

message
string
Example:

"Redteam task has been added successfully"

data
object
Example:
{
  "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
  }
}