Skip to main content
POST
Add Custom Task with saved model (V3)

Authorizations

apikey
string
header
required

Headers

X-Enkrypt-Model
string
required

The model saved name. E.g. Test Model

Example:

"Test Model"

X-Enkrypt-Model-Version
string
required

The model version. Default is 'v1'

Example:

"v1"

X-Enkrypt-Policy
string

The Code of Conduct policy name. You can use this instead of sending dataset_configuration.policy_description in the body

Example:

"Test CoC Policy"

X-Enkrypt-Refresh-Cache
boolean

Refresh the cache if data is stale

Example:

false

Body

application/json
dataset_configuration
DatasetsCustomConfig · object
required
Example:
redteam_test_configurations
RedteamV3TestConfigurations · object
required
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:

Response

200 - application/json

Successful Response

task_id
string
required
Example:

"generate-and-redteam-f790e68a-48f6-410a-9e83-xxxxxxx"

status
enum<string>

Status of the task

Available options:
Success,
Failed
Example:

"Success"

message
string
Example:

"Task submitted successfully"

data
RedteamCustomResponseConfig · 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: