Launch Week 3: Five days of launches

Create Risk Category

(v2)

POST

Adds a risk category to a red teaming framework and returns its id. Send vulnerabilityTypeIds and attackMethodIds to fill it in the same call: a category with neither probes for nothing when the framework runs.

POST/v2/rt-frameworks/{rtFrameworkId}/risk-categories
curl -X POST "https://api.confident-ai.com/v2/rt-frameworks/{rtFrameworkId}/risk-categories" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Data protection",
  "description": "Risks around leaking data the model was given.",
  "vulnerabilityTypeIds": [
    "<VULNERABILITY-TYPE-ID>"
  ],
  "attackMethodIds": [
    "<ATTACK-METHOD-ID>"
  ],
  "vulnerabilityIdToPriorityLevel": {
    "<VULNERABILITY-ID>": 2
  }
}'
200
{
  "success": true,
  "data": {
    "id": "<RISK-CATEGORY-ID>"
  },
  "link": "https://app.confident-ai.com/project/<PROJECT-ID>/frameworks/<RT-FRAMEWORK-ID>",
  "deprecated": false
}

Headers

  • CONFIDENT_API_KEYstringRequired

    The API key of your Confident AI project.

Path parameters

  • rtFrameworkIdstringRequired

    The id of the red teaming framework.

Request body

  • namestringRequired

    The name of the risk category, unique within the framework.

  • descriptionstring | null

    What this risk category covers. Send null to clear it.

  • vulnerabilityTypeIdslist of strings

    The ids of the vulnerability types to probe for. The list replaces the category's current selection.

  • attackMethodIdslist of strings

    The ids of the attack methods to probe with. The list replaces the category's current selection.

  • vulnerabilityIdToPriorityLevelobject | null

Response

Create Risk Category succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    A reference to a risk category by its id.

    Show 1 propertyHide 1 property
    • idstring

      The id of the risk category, generated by Confident AI.

  • linkstring

    This is the URL of the resource on the Confident AI platform.

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI