Run Risk Assessment

Starts a risk assessment run asynchronously against a framework’s risk categories, then returns a link to the assessment.

Target your application with either an AI connection (by name) or a prompt (by alias and commit). Provide exactly one, or set generationMode to disambiguate. Requires an Enterprise plan.

Path parameters

frameworkIdstringRequired
The unique identifier of the framework to run.

Headers

CONFIDENT_API_KEYstringRequired
The API key of your Confident AI project.

Request

This endpoint expects an object.
riskCategorieslist of stringsRequired
The names of the risk categories to assess, exactly as returned by the list frameworks endpoint.
exposureenumRequired
The exposure level of the application under test.
identifierstringOptional
An optional label for the run.
aiConnectionIdstringOptional

The ID of the AI connection to target, you can find this in the Project Settings → AI Connections on the platform. Required for AI_CONNECTION mode.

promptAliasstringOptional

The alias of the prompt to target. Required for PROMPT mode.

promptCommitstringOptional
The prompt commit hash to target. Defaults to the latest commit on the prompt's main branch.
generationModeenumOptional

The target type. Optional when exactly one of aiConnectionId or promptAlias is provided.

attackEngineobjectOptional
Optional attack generation settings.

Response

successboolean
Indicates if the risk assessment run was started.
dataobject