Skip to main content
POST
Run Threat Modeling

Authorizations

apikey
string
header
required

Headers

X-Enkrypt-Policy
string

Name of a saved Code of Conduct policy to test against. The gateway resolves it, renders its rules into context.policy_description (v1 free text, or the v2 Policy Wizard enabled rules joined in their stored order) and records the name on the run as policy_name. This OVERRIDES any context.policy_description sent in the body, so a run is never labelled with one policy but generated from another's text - omit the header to keep your own wording.

Example:

"customer-support-coc"

Body

application/json

POST /v1/threat-modeling payload.

Datagen-only. No model, no attacks. Per payload.md:

  • risk_categories: { <cat>: {} } OR compliance_frameworks: [...]
  • context: { system_description?, policy_description? }
  • generation_config: { max_prompts?, seed_prompts?, include_standard_library? } (dataset_name NOT accepted — you're creating a dataset, not consuming one)
risk_categories
Risk Categories · object | null
compliance_frameworks
enum<string>[] | null
Available options:
owasp_llm_top10,
eu_ai_act,
nist_ai_rmf,
mitre_atlas,
iso_42001,
aiuc_1
context
Context · object | null
generation_config
GenerationConfig · object | null

generation_config block per payload.md.

Two mutually-exclusive modes:

  • Pre-built dataset: dataset_name
  • On-the-fly generation: max_prompts and/or seed_prompts

Plus an orthogonal include_standard_library toggle (default true).

run_name
string | null
Required string length: 1 - 200
comprehensiveness
enum<string> | null

How exhaustively to test. Standard runs the normal attack budget and Comprehensive widens it; Low, Medium and High are the equivalent sample-size settings surfaced in the dashboard. Omit to use the service default.

Available options:
Low,
Medium,
High,
Standard,
Comprehensive
Example:

"Standard"

user_metadata
User Metadata · object | null

Response

Successful Response

The response is of type Response Run Threat Modeling V1 Threat Modeling Post · object.