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.
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."
]
}
}'{
"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_KEYstringRequiredThe API key of your Confident AI project.
Path parameters
rtFrameworkIdstringRequiredThe id of the red teaming framework.
Request body
identifierstringA human-readable identifier for the risk assessment, shown on the Confident AI platform.
riskCategorieslist of stringsRequiredThe names of the framework's risk categories to run. Every name must belong to this framework.
exposureenumRequiredA 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
LOWMEDIUMHIGH
aiConnectionIdstringThe id of the AI connection to attack. Send this or
promptAlias, never both.promptAliasstringThe alias of the prompt to attack. Send this or
aiConnectionId, never both.promptCommitstringThe commit hash of the prompt to attack. Requires
promptAlias; defaults to its latest commit.generationModeenumWhere 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
aiConnectionIdorpromptAlias, and Confident AI infers the mode from whichever you sent.Show 2 enum valuesHide 2 enum values
AI_CONNECTIONPROMPT
attackEngineobjectHow attacks are generated for this run.
Show 1 propertyHide 1 property
generationGuidelineslist of stringsExtra instructions the attacker follows when generating attacks against this system.
Response
Run Framework succeeded.
successbooleanIndicates if the request was successful.
dataobjectA reference to a risk assessment by its id.
Show 1 propertyHide 1 property
idstringThe id of the risk assessment the run started.
linkstringThis is the URL of the resource on the Confident AI platform.
deprecatedbooleanIndicates if this endpoint is deprecated.