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

# Cloak

> Replace personal data before a model sees it, and restore it in the response, only for the identity that owns it.

Cloak finds personal data in a request and replaces it before the request reaches a model. When the model answers, Cloak puts the original values back, and only for the identity that protected them.

<Note>
  Cloak is in beta. It detects identifiers, payment card data, and credentials in text. It does not yet detect health data, and it does not read audio or images. See [Limits](/cloak/limits).
</Note>

## What it does

<Steps>
  <Step title="Detect">
    The control plane finds personal data in your payload and returns where it is,
    as a type and a range. It never returns the value.
  </Step>

  <Step title="Replace">
    The SDK swaps each value for a token, a hash, a mask, or a label, in your own
    payload. Nothing is sent anywhere to be rewritten.
  </Step>

  <Step title="Forward">
    The model sees `Email the receipt to [[email:f098b0367449]]`, not the address.
  </Step>

  <Step title="Restore">
    The model answers using the token. You restore the response, and the address
    comes back, for the identity that owns it and no one else.
  </Step>
</Steps>

## Why it exists

A model provider does not need someone's card number to draft a receipt email. Keeping personal data out of the request means it never sits in a provider's logs, never appears in a training pipeline you do not control, and cannot be repeated back to the wrong user.

Cloak helps you minimise the personal data your models receive, which supports data-minimisation duties under regimes such as GDPR and the EU AI Act. It does not by itself make a system compliant, and it is not legal advice.

## What is detected

Personal data, payment card data, and credentials, as 24 types in four categories. See [Entity types](/cloak/entity-types).

## Properties worth knowing

<CardGroup cols={2}>
  <Card title="Nothing recognises data in your process" icon="shield">
    Detection runs on the control plane. The SDK holds no recognisers, so there is
    nothing on a client to read or step around.
  </Card>

  <Card title="Values are never echoed" icon="eye-slash">
    The control plane returns types and ranges. A response, a log, or a proxy never
    holds a second copy of what Cloak exists to protect.
  </Card>

  <Card title="Identity-bound restore" icon="key">
    A token belongs to the context it was made under. Another context's token is
    refused, not restored.
  </Card>

  <Card title="Fails closed" icon="lock">
    A request Cloak could not check is refused, not forwarded.
  </Card>
</CardGroup>

## Where to go next

<CardGroup cols={2}>
  <Card title="Protect and restore" href="/cloak/protect-and-restore">
    The `protect` call, `wrap`, `decorate`, and restoring a response.
  </Card>

  <Card title="Strategies" href="/cloak/strategies">
    Tokenize, hash, mask, or redact, per type or per category.
  </Card>
</CardGroup>


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