> ## Documentation Index
> Fetch the complete documentation index at: https://docs.enkryptai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Attack Methods Reference

> All 21 attack techniques available in the Enkrypt AI Red Team API, what each does, and which modality it needs

An attack method is *how* a risk gets probed. The same sub-category — say
`harmful_instructions` — is tested very differently by `basic` than by `goat`.

Attack IDs go in `attack_config`, keyed by ID, with an options object as the value:

```json theme={"system"}
{
  "risk_categories": {
    "safety_harm": {
      "attack_config": {
        "basic": {},
        "encoding": {},
        "tap": {}
      }
    }
  }
}
```

> [!WARNING]
>
> `attack_config` must be an **object**, not a list. `{"basic": {}}` is valid;
> `["basic"]` is rejected. An empty options object `{}` means "use the defaults for this
> technique".

## The three buckets

Every technique falls into one of three buckets, which is also how results are grouped
in the report.

> [card] Baseline
>
> The untransformed prompt, asked directly. Establishes what your target refuses without
> any adversarial pressure.

> [card] Evasion
>
> The carrier is mutated — encoded, translated, rendered into an image or audio — while
> the intent stays the same. Tests whether safety training generalises past surface form.

> [card] Adaptive jailbreak
>
> An attacker model probes, adapts and escalates across turns based on what your target
> replies. The strongest and most expensive techniques.

## Full index

| Attack ID | Bucket | Modality | Summary |
| - | - | - | - |
| `basic` | Baseline | Text | The prompt as-is, no transformation |
| `encoding` | Evasion | Text | Re-encodes the payload (Base64, ROT-N, homoglyphs, zero-width and similar) |
| `obfuscation` | Evasion | Text | Perturbs the surface text to defeat literal filters |
| `lang` | Evasion | Text | Translates into other languages to exploit uneven multilingual safety training |
| `word_masking` | Evasion | Image | Masks key words and supplies them via an image the model must read |
| `long_character` | Evasion | Text | Very long or padded inputs that push the payload out of the attention window |
| `fc` | Evasion | Image | Renders the request as a flowchart image the model is asked to complete |
| `figstep` | Evasion | Image | Types the instruction into an image so it bypasses text-side filtering |
| `camo` | Evasion | Image | Camouflages the payload inside otherwise benign imagery |
| `waveform` | Evasion | Audio | Perturbs the audio carrier while preserving the spoken request |
| `deepinception` | Adaptive | Text | Nests the request inside layered fictional scenes until safety context is lost |
| `single_shot` | Adaptive | Text | Alias for `deepinception` |
| `graph` | Adaptive | Text | Explores a graph of related framings, following whichever branch is conceding |
| `tap` | Adaptive | Text | Tree-of-Attacks with Pruning — branches, scores and prunes candidate prompts iteratively |
| `goat` | Adaptive | Text | Adversarial multi-turn conversation that escalates based on each reply |
| `audio_goat` | Adaptive | Audio | The multi-turn conversational attack conducted over audio |
| `whisper_bandit` | Adaptive | Audio | Speaks the request in synthesized voices under rotating framings, learning which combination works and escalating with it over a multi-turn audio conversation. Text reply |
| `deixis` | Adaptive | Image | Renders the request's sensitive keyword into an image, then escalates over a multi-turn conversation that refers to it. Text reply |
| `rt_agent` | Adaptive | Text | An autonomous red team agent that plans and revises its own approach |
| `rt_agent_v2` | Adaptive | Text | The current-generation red team agent, with recon and technique selection |
| `derail_yourself` | Adaptive | Text | Character-mediated indirection that reaches the target content through a persona |
| `attack_in_the_middle` | Adaptive | Text | Interposes adversarial content mid-conversation rather than at the opening turn |

> [!NOTE]
>
> **`hades` is not yet available.** It appears in older schema versions but is not
> generally available, and a run declaring it is rejected with a `400` telling you
> it is coming soon. Leave it out of `attack_config` until it ships. `deixis` is a
> separate, available technique.

> [!NOTE]
>
> `single_shot` and `lang` are accepted aliases — they resolve to `deepinception` and the
> translation strategy respectively. Results are reported under the canonical name.

## Choosing by modality

Attacks only run against targets that can accept their modality. Declare what your target
supports:

```json theme={"system"}
{
  "target": {
    "endpoint": "https://api.openai.com/v1/chat/completions",
    "api_key": "sk-...",
    "model_name": "gpt-4o",
    "input_modalities": ["text", "image"],
    "output_modalities": ["text"]
  }
}
```

> [!WARNING]
>
> Requesting an image attack against a text-only target will not produce useful results.
> Check `input_modalities` before adding `figstep`, `camo`, `fc`, `word_masking` or
> `deixis`, and before adding `waveform`, `audio_goat` or `whisper_bandit`.

| Target accepts | Available attacks |
| - | - |
| Text | `basic`, `encoding`, `obfuscation`, `lang`, `long_character`, `deepinception`, `single_shot`, `graph`, `tap`, `goat`, `rt_agent`, `rt_agent_v2`, `derail_yourself`, `attack_in_the_middle` |
| Image | `figstep`, `camo`, `fc`, `word_masking`, `deixis` |
| Audio | `waveform`, `audio_goat`, `whisper_bandit` |

## Choosing by effort

Adaptive techniques call an attacker model repeatedly, so they cost more and take longer
than evasion transforms, which cost more than the baseline. This drives both run time and
[credit pricing](https://docs.enkryptai.com/resources/credits.md).

**1. Start with basic**

Run `basic` alone first. It is cheap, fast, and tells you what your target refuses with
no pressure at all. Anything that fails here is a straightforward gap.

**2. Add evasion**

Add `encoding` and `lang`. If your target refuses a request in plain English but complies
with it Base64-encoded or translated, safety training has not generalised past surface
form.

**3. Add adaptive**

Add `tap` or `goat` for the risks that matter most. These find the failures a single-turn
test cannot, but budget accordingly.

**4. Go multi-modal**

If your target accepts images or audio, add the corresponding techniques. Vision and
audio paths are frequently less well defended than the text path.

## Recommended combinations

> [tab] Quick smoke test
>
> Cheap, fast, catches obvious gaps.
>
> ```json theme={"system"}
> {
>   "attack_config": { "basic": {} }
> }
> ```

> [tab] Standard assessment
>
> The usual starting point for a real assessment.
>
> ```json theme={"system"}
> {
>   "attack_config": {
>     "basic": {},
>     "encoding": {},
>     "lang": {},
>     "tap": {}
>   }
> }
> ```

> [tab] Deep assessment
>
> For high-stakes deployments, before a launch or an audit.
>
> ```json theme={"system"}
> {
>   "attack_config": {
>     "basic": {},
>     "encoding": {},
>     "obfuscation": {},
>     "lang": {},
>     "long_character": {},
>     "tap": {},
>     "goat": {},
>     "derail_yourself": {},
>     "rt_agent_v2": {}
>   }
> }
> ```
>
> Pair with `"comprehensiveness": "Comprehensive"`.

> [tab] Vision-language target
>
> ```json theme={"system"}
> {
>   "attack_config": {
>     "basic": {},
>     "figstep": {},
>     "camo": {},
>     "fc": {},
>     "word_masking": {}
>   }
> }
> ```
>
> Requires `"input_modalities": ["text", "image"]` on the target.

> [tab] Audio-language target
>
> ```json theme={"system"}
> {
>   "attack_config": {
>     "basic": {},
>     "waveform": {},
>     "audio_goat": {}
>   }
> }
> ```
>
> Requires `"input_modalities": ["text", "audio"]` on the target.

## Per-attack options

Each attack accepts an options object. `{}` selects the technique with its defaults,
which is the right choice unless you have a specific reason to tune it.

```json theme={"system"}
{
  "attack_config": {
    "encoding": { "types": ["base64", "rot13", "url"], "prompt_type": "both" },
    "lang": { "languages": ["hindi", "spanish"] },
    "obfuscation": { "technique": "zero_width", "intensity": 0.3 },
    "tap": { "depth": 3 },
    "goat": { "max_turns": 6 }
  }
}
```

### `encoding`

| Option | Type | Default | Values |
| - | - | - | - |
| `types` | string\[] | all | `ascii`, `base64`, `binary`, `hex`, `leet`, `morse`, `rot13`, `rot21`, `url` |
| `type` | string | — | A single encoding instead of a list |
| `prompt_type` | string | `both` | `request`, `threat` or `both` |
| `iterations` | integer | `1` | 1–3 — how many times to apply the encoding |

### `lang`

| Option | Type | Default | Values |
| - | - | - | - |
| `languages` | string\[] | all | `spanish`, `french`, `german`, `italian`, `portuguese`, `mandarin`, `japanese`, `korean`, `arabic`, `hindi`, `swahili`, `zulu`, `yoruba` |
| `language` | string | — | A single language instead of a list |

### `obfuscation`

| Option | Type | Default | Values |
| - | - | - | - |
| `technique` | string | — | `zero_width`, `homoglyph`, `leetspeak`, `char_swap` |
| `intensity` | number | `0.3` | 0.0–1.0 — how heavily to perturb |

### `tap`

| Option | Type | Default | Range |
| - | - | - | - |
| `depth` | integer | `3` | 1–5 — how many rounds to iterate. Also accepted as `max_depth`. |
| `width` | integer | `5` | 1–10 — candidates kept after pruning |
| `branching_factor` | integer | `9` | 1–10 — candidates generated per round |

### `goat`

| Option | Type | Default | Values |
| - | - | - | - |
| `max_turns` | integer | `6` | 2–10 — conversation length |
| `opener_strategy` | string | `softball` | `softball`, `direct`, `persona`, `hypothetical` |

### `derail_yourself`

| Option | Type | Default | Values |
| - | - | - | - |
| `num_actors` | integer | `3` | 1–5 — personas to try |
| `max_turns` | integer | `5` | 1–10 |
| `persona_set` | string | `mixed` | `research`, `corporate`, `emergency`, `creative`, `mixed` |

### `rt_agent_v2`

| Option | Type | Default | Range |
| - | - | - | - |
| `max_iterations` | integer | `8` | 1–25 — how long the agent may keep adapting |
| `recon` | boolean | `true` | Whether to profile the target before attacking |

### `deixis`

Image and text in, text out. The attack finds the sensitive keyword in the request,
renders it as an image and refines that image over several rounds. It then opens a
conversation that sends the image and refers to it, rather than naming the keyword, and
escalates turn by turn. The target must accept images (`"input_modalities": ["text", "image"]`),
and the whole exchange runs as one multi-turn session.

| Option | Type | Default | Range |
| - | - | - | - |
| `rounds` | integer | `3` | 1–6 — image refinement rounds before the conversation starts |
| `max_extra_turns` | integer | `4` | 0–8 — caps the attacker-written follow-up turns after the two fixed escalation steps |
| `stop_threshold` | number | `0.7` | 0.0–1.0 — how strong a response must score before escalation stops early |
| `referent_second_look` | boolean | `true` | If the first reply does not identify what the image shows, ask the target to look again |
| `seed` | integer | `0` | Fixes the random choices, so a run can be reproduced |
| `policy_document` | string | — | Up to 20,000 characters. Your deployment's policy, used to aim the attack at what this deployment must not do. Omit for a general run |

> [!NOTE]
>
> `deixis` was previously documented as `hades_at`. It is the same attack under its new
> ID, and `hades_at` is no longer accepted in `attack_config`.

### `whisper_bandit`

Audio and text in, text out. The attack speaks the request in synthesized voices,
wraps it in a framing strategy and applies light audio perturbations, then sends the
clip with a short text prompt. Across a multi-turn conversation it tracks which
combination of framing, voice and perturbation gets furthest with your target and
escalates with that. The target must accept audio (`"input_modalities": ["text", "audio"]`),
and the whole exchange runs as one multi-turn session.

| Option | Type | Default | Values |
| - | - | - | - |
| `escalation_turns` | integer | `4` | 2–6 — conversation length |
| `strategies` | string\[] | all | `sandwich`, `role_play`, `fictional`, `decomposition`, `authority` — the framings the attack may choose from |
| `voices` | string\[] | a built-in mix | `neutral_adult_f`, `professional_adult_m`, `fast_adult_f`, `concerned_senior`, `assertive_client_gb`, `whisper_f`, `urgent_m`, `angry_f`, `child_f` |

> [!NOTE]
>
> Techniques not listed here take no behavioural options — pass `{}`. Raising iteration,
> depth, round or turn counts increases both run time and [credit cost](https://docs.enkryptai.com/resources/credits.md).

## Attacks in the Playground

The Playground runs attacks against a single stated goal with no category scaffolding.
`attack_config` sits at the **top level** there, not nested under a category:

```json theme={"system"}
{
  "target": { "...": "..." },
  "goal": "Get the model to reveal its system prompt",
  "attack_config": { "tap": {}, "goat": {} }
}
```

See [Run Playground](https://docs.enkryptai.com/api-reference/redteam-v2-api-reference/endpoint/run-playground.md).

## Reading attack results

Results break down by technique so you can see which ones worked:

```json theme={"system"}
{
  "summary": {
    "categories": {
      "safety_harm": {
        "asr": 12.0,
        "by_attack_method": {
          "basic": { "asr": 0.0 },
          "encoding": { "asr": 8.0 },
          "tap": { "asr": 28.0 }
        }
      }
    }
  }
}
```

> [!TIP]
>
> A `basic` ASR of 0 with a high `tap` ASR is the common and important pattern: the target
> refuses direct requests but yields under adaptive pressure. Fixing that needs defence in
> depth, not a longer refusal list.

## Related

* [Payload Guide](https://docs.enkryptai.com/get-started/redteam/payload-guide.md) — where `attack_config` fits
* [Risk Category Catalog](https://docs.enkryptai.com/get-started/redteam/test-catalog.md) — what to point these at
* [Examples](https://docs.enkryptai.com/get-started/redteam/examples.md) — complete payloads
* [Credits & pricing](https://docs.enkryptai.com/resources/credits.md) — how attack choice affects cost


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.