Skip to main content
POST
Add Task

Authorizations

apikey
string
header
required

Body

application/json
redteam_test_configurations
RedteamTestConfigurations · object
required
target_model_configuration
RedteamTargetModelConfiguration · object
required
test_name
string
Example:

"Test 1"

dataset_name
string
Example:

"standard"

user_metadata
object

Optional arbitrary metadata object echoed back in the response. Limits: at most 16 top-level keys, key names up to 64 characters, nesting depth up to 3, total serialized size up to 4 KB. When provided and valid, this object is also echoed as a top-level user_metadata key on error responses (4xx/5xx) of endpoints that accept it; invalid or oversized metadata is never echoed, including on the 422 response it causes.

Example:

Response

200 - application/json

Successful Response

task_id
string
required
Example:

"generate-and-redteam-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
RedteamResponseConfig · object
Example:
user_metadata
object

Optional arbitrary metadata object echoed back in the response. Limits: at most 16 top-level keys, key names up to 64 characters, nesting depth up to 3, total serialized size up to 4 KB. When provided and valid, this object is also echoed as a top-level user_metadata key on error responses (4xx/5xx) of endpoints that accept it; invalid or oversized metadata is never echoed, including on the 422 response it causes.

Example: