---
title: "Run Risk Assessment"
method: POST
path: "/v1/risk-assessments/frameworks/{frameworkId}/run"
tags: ["Risk Assessments"]
---

# Run Risk Assessment

`POST /v1/risk-assessments/frameworks/{frameworkId}/run`

## Request

- Base URL: `https://api.confident-ai.com`
- URL: `https://api.confident-ai.com/v1/risk-assessments/frameworks/{frameworkId}/run`
- Auth: none declared
- TypeScript: <https://skmtc.dev/confident-ai/apis/confident-ai-metrics-api/docs/v1/risk-assessments/frameworks/:frameworkId/run/post.ts> (a function with typed inputs; its response is checked against the schema)

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.

## Request body

- RunRiskAssessmentRequest
  - `riskCategories` string[], required: The names of the risk categories to assess, exactly as returned by the list frameworks endpoint.
  - `exposure` 'LOW' | 'MEDIUM' | 'HIGH', required: The exposure level of the application under test.
  - `identifier` string: An optional label for the run.
  - `aiConnectionId` string: 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.
  - `promptAlias` string: The alias of the prompt to target. Required for `PROMPT` mode.
  - `promptCommit` string: The prompt commit hash to target. Defaults to the latest commit on the prompt's main branch.
  - `generationMode` 'AI_CONNECTION' | 'PROMPT': The target type. Optional when exactly one of `aiConnectionId` or `promptAlias` is provided.
  - `attackEngine` object: Optional attack generation settings.
    - `generationGuidelines` string[]: Freeform guidelines that are used to guide the simulator model when generating attacks, give clear instructions to generate attacks that are more customized for your use case.

## Response `200`

- RunRiskAssessmentResponse
  - `success` boolean, required: Indicates if the risk assessment run was started.
  - `data` object, required
    - `id` string, required: The unique identifier of the created risk assessment.
  - `link` string: A link to view the risk assessment.

## Changes

> 54 revisions in range; 3 not diffed.

- **2026-07-03** `316e89b6f2ef`: 1 warning, 1 info
  - removed the request property `aiConnectionName`
  - added the new optional request property `aiConnectionId`
- **2026-07-01** `82c22d26c969`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/confident-ai/apis/confident-ai-metrics-api/changes/v1/risk-assessments/frameworks/:frameworkId/run/post.md)

---

[API](https://skmtc.dev/confident-ai/apis/confident-ai-metrics-api.md) - [All operations](https://skmtc.dev/confident-ai/apis/confident-ai-metrics-api/llms.txt) - [OpenAPI document](https://skmtc.dev/confident-ai/apis/confident-ai-metrics-api/revisions/95cdde71b65e?raw)
