Launch Week 02 wrapped — explore all five launches

Run Framework

POSThttps://api.confident-ai.com/v2/rt-frameworks/{rtFrameworkId}/run

Runs the named risk categories of a red teaming framework against your AI connection or prompt, and returns the id of the risk assessment it started. The assessment runs in the background; follow it on the Confident AI platform. Provide exactly one target: aiConnectionId or promptAlias.

POST/v2/rt-frameworks/{rtFrameworkId}/run
curl -X POST "https://api.confident-ai.com/v2/rt-frameworks/{rtFrameworkId}/run" \
  -H "CONFIDENT_API_KEY: <PROJECT-API-KEY>" \
  -H "Content-Type: application/json" \
  -d '{
  "identifier": "pre-release-2025-01",
  "riskCategories": [
    "Data protection"
  ],
  "exposure": "LOW",
  "aiConnectionId": "<AI-CONNECTION-ID>",
  "promptAlias": "customer-support",
  "promptCommit": "bab04ce",
  "generationMode": "AI_CONNECTION",
  "attackEngine": {
    "generationGuidelines": [
      "Write in the voice of a frustrated customer."
    ]
  }
}'
200
{
  "success": true,
  "data": {
    "id": "<RISK-ASSESSMENT-ID>"
  },
  "link": "https://app.confident-ai.com/project/<PROJECT-ID>/risk-profile/assessments/<RISK-ASSESSMENT-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

  • identifierstring

    A human-readable identifier for the risk assessment, shown on the Confident AI platform.

  • riskCategorieslist of stringsRequired

    The names of the framework's risk categories to run. Every name must belong to this framework.

  • exposureenumRequired

    A three-step scale, LOW to HIGH, used for how exposed a system under test is and how easily an attack method exploits it.

    Show 3 enum valuesHide 3 enum values
    • LOW
    • MEDIUM
    • HIGH
  • aiConnectionIdstring

    The id of the AI connection to attack. Send this or promptAlias, never both.

  • promptAliasstring

    The alias of the prompt to attack. Send this or aiConnectionId, never both.

  • promptCommitstring

    The commit hash of the prompt to attack. Requires promptAlias; defaults to its latest commit.

  • generationModeenum

    Where the actual outputs come from when running a dataset: AI_CONNECTION generates them with an AI connection, PROMPT with a prompt. Omit it when you supply at most one of aiConnectionId or promptAlias, and Confident AI infers the mode from whichever you sent.

    Show 2 enum valuesHide 2 enum values
    • AI_CONNECTION
    • PROMPT
  • attackEngineobject

    How attacks are generated for this run.

    Show 1 propertyHide 1 property
    • generationGuidelineslist of strings

      Extra instructions the attacker follows when generating attacks against this system.

Response

Run Framework succeeded.

  • successboolean

    Indicates if the request was successful.

  • dataobject

    A reference to a risk assessment by its id.

    Show 1 propertyHide 1 property
    • idstring

      The id of the risk assessment the run started.

  • linkstring

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

  • deprecatedboolean

    Indicates if this endpoint is deprecated.

Built byConfident AI