Top level
risk_categories and compliance_frameworks are mutually exclusive and one is required.
Supplying both, or neither, is a validation error.target
The system being tested.
system_description on the target is copied into context.system_description (clipped to
2000 characters) when you have not set one explicitly. Setting either is enough.target.tools
Required when system_type is agent. Each entry describes one tool the agent can call.
Custom endpoints
For an API that is not one of the named providers, setprovider to custom and describe
the call yourself: the headers to send, the body to send, and where the reply text is in the
response.
payload. These are replaced on every call, anywhere in the body:
response_path is a jq-style path into the JSON response, such as
.choices[0].message.content or .result.outputs[0].content.text. Leave it out for an
OpenAI-compatible response.
curl_command is an alternative to headers and payload: paste a working cURL call
with {prompt} where the attack prompt goes. endpoint is still required and is the URL that
is called, so set it to the same URL as the command.
headers and curl_command usually carry credentials. They are kept out of the request
logs, the same way api_key is.target.metadata.relay
For targets that are not reachable from the public internet. Requires
connect_via_relay: true, which stays at the root of target.
target.metadata accepts relay and nothing else. Any other key — metadata.tenant_id,
metadata.aws_region, provider-specific metadata in general — is a 422. The Red Team
target has no way to express provider metadata, so accepting it silently would let the run
attack a differently-configured target and report success on it. Use the Archived Red Team
API for a target that needs provider metadata. Unknown keys inside relay are a 422
too, and there is no relay endpoint, token, timeout or offline-grace setting to configure:
the relay address is fixed infrastructure and the timeouts are server-side.target.relay — the bare spelling, without metadata — is the older form and is still
accepted, so nothing that works today breaks. Prefer target.metadata.relay: it is the
spelling used everywhere else, including what a saved model stores as
model_config.metadata.relay. Sending both is fine only if they carry the same block; if
they disagree the request is a 422 naming the conflict.Validation errors
An inlinetarget is validated by the Red Team service, which answers 422 with a detail
array. These are the exact strings:
The
Value error, prefix is part of the returned msg; the same sentence without it is
repeated in ctx.error. The last element of loc names your offending key.
A saved model is projected into a target by the gateway before the service sees it, so
the equivalent failures there are 400s whose message names the model — for example
Saved model 'internal-llm' sets connect_via_relay but carries no metadata.relay block naming the bridge to route through.
The full list is in
Red Teaming Through the Relay Bridge.
For the end-to-end walkthrough — running the bridge, confirming it is connected, and the
saved-model form — see
Red Teaming Through the Relay Bridge. The endpoints
themselves are
Relay Bridge Connect
and Relay Bridge Status.
Saved models
Rather than sendingtarget inline, you can reference a model saved through the
Models API using the saved-model
endpoints, which take no target block at all:
POST /rt/model/redteamPOST /rt/model/redteam/jailbreakPOST /rt/model/playgroundPOST /rt/model/model-health
risk_categories
An object keyed by category ID. Each value configures that category.
sub_categories entries are natural-language phrases, not the sub-category IDs used in
reporting. They are intended to come from the profile returned by
POST /rt/threat-modeling/categories,
edited as you see fit. Omit the field to expand the category’s full taxonomy.compliance_frameworks
An array of framework IDs. The platform expands each into the categories and
sub-categories its controls map onto.
context
Grounds prompt generation in what your system actually is. Optional, but generated
prompts are substantially more relevant with it — particularly for
brand_reputation_trust and product_misuse_abuse.
policy_description or policy_rules
Two shapes for the same thing. Send one, not both.
policy_description is free text — paste your rules as prose. Simplest, and
what most callers want.
policy_rules carries each rule as its own object, so a judge can cite the rule
it fired on rather than a line out of a blob:
text is the only field that has to be there. risk_category is one of the
eight risk category ids; severity is
critical / high / medium / low; frameworks holds framework codes
(hipaa, finra, gdpr, ccpa, owasp_llm_2025, nist_ai_rmf,
eu_ai_act, iso_42001). Anything else you attach to a rule is carried
through untouched.
You rarely have to build this by hand. Name a saved Code of Conduct policy in
the X-Enkrypt-Policy header and the gateway fills whichever shape fits: a
Policy Wizard policy arrives as policy_rules, an older Policy Atomizer one as
policy_description, and the other field is cleared. Anything you sent in
context for that field is overwritten — the header means run against this
saved policy.
generation_config
Controls how the prompt set is produced.
include_standard_library is also accepted under its older name
include_standard_data.seed_prompts
comprehensiveness
How exhaustively to test. Affects the number of prompts, the attack budget, run duration
and cost.
Omit the field entirely to use the service default.
user_metadata
Arbitrary tracking fields of your own. Echoed back on the queued response, the status
response, the results and — where the request was well-formed enough to read it — on
error responses.
Other endpoints
POST /rt/playground
A single ad-hoc probe. No categories, no generation.
run_id lets you subscribe to the log stream before submitting, since the Playground only
names the job once the probe finishes. A UUID already in use returns 409 RUN_ID_CONFLICT — retry with a fresh one.POST /rt/eval
Score prompt/response pairs you already have.
Each sample:
POST /rt/threat-modeling/data
Phase 2 of the two-phase flow. Takes the phase-1 profile back.
Related
- Payload Guide — how the blocks fit together
- Risk Category Catalog — valid category IDs
- Attack Methods Reference — valid attack IDs
- Examples — complete payloads
- API Reference — full schemas

