Skip to main content
Copy and adapt these for your own use case. Every example is a complete request body — nothing is elided.
All examples POST to https://api.enkryptai.com with an apikey header. See the Quickstart for the full request/response cycle.

1. Smallest possible run

Everything optional removed. Good for verifying credentials and connectivity.
POST /rt/redteam

2. Standard assessment of a chatbot

The common shape: a described system, several categories, a mix of baseline and evasion attacks.
POST /rt/redteam

3. Compliance-scoped run

Scope by framework instead of by category. The platform expands the framework into the categories its controls map onto.
POST /rt/redteam
compliance_frameworks and risk_categories cannot both be present. Pick one.
Once finished, read it back against the framework:

4. Narrowing generation with phrases

Scope generation to specific concerns within a category. These are free-form phrases, usually taken from POST /rt/threat-modeling/categories.
POST /rt/redteam

5. Agent with tools

POST /rt/redteam
tools is required when system_type is agent. A successful attack will cause your agent to actually call these tools — point the run at a staging deployment.

6. Vision-language target

POST /rt/redteam

7. Audio-language target

POST /rt/redteam

8. Saved model

Drop target entirely and reference a model saved through the Models API. The saved model name and version travel as headers.
POST /rt/model/redteam
See Run Red Team with a Saved Model for the required headers.

9. Threat modeling — two-phase flow

Review the test set before spending a run on it.
1

Analyze — get a suggested profile

POST /rt/threat-modeling/categories
On this endpoint each category must be an empty object {}. Passing attack_config or sub_categories is rejected — nothing is being attacked yet.
2

Generate — feed the edited profile back

POST /rt/threat-modeling/data
3

Run against the generated dataset

POST /rt/redteam
dataset_name cannot be combined with max_prompts or seed_prompts.

One-shot threat modeling

When you do not need to review the profile in between:
POST /rt/threat-modeling

10. Playground — a single ad-hoc probe

No categories, no dataset. One goal, several techniques. Note attack_config sits at the top level here.
POST /rt/playground
Supply your own run_id (a UUID) to open the log stream before submitting — the Playground blocks until the probe is over and only names the job in the response. A UUID already in use returns 409 RUN_ID_CONFLICT.

11. Eval — score transcripts you already have

No target, no generation. You bring the prompt/response pairs.
POST /rt/eval
samples accepts 1 to 10,000 rows. Results come back via GET /rt/runs/{run_id}/records.

12. Target behind the Relay bridge

For a target that is not reachable from the public internet.
POST /rt/redteam
connect_via_relay stays at the root of target; the relay block belongs under metadata, which accepts relay and no other key. The bare target.relay spelling is still accepted for existing integrations — see target.metadata.relay. Red Teaming Through the Relay Bridge walks the whole flow end to end. The endpoints are Relay Bridge Connect for establishing the bridge and Relay Bridge Status for checking it is live.

13. Check a target before spending a run

POST /rt/model-health
Returns whether Enkrypt AI can reach and call the target, with the probe query and the reply it got back. Free to call.

14. Turn results into remediation

Feed a finished run’s summary into the mitigation endpoints.
POST /rt/risk-mitigation/system-prompt
POST /rt/risk-mitigation/guardrails-policy
POST /rt/findings
All three are free to call. See Risk Mitigation and Findings.