---
title: "Take identifying detail out of text"
method: POST
path: "/redact"
---

# Take identifying detail out of text

`POST /redact`

## Request

- Base URL: `https://secureai.one/v1`
- URL: `https://secureai.one/v1/redact`
- Auth: HTTP bearer

Returns the text with people replaced by plausible stand-ins, and the map needed to reverse it. Send the returned text to your model; send the model's reply to /restore with the same map.

## Request body

- RedactRequest
  - `text` string, required: The text to redact.
  - `map` object: A map from a previous call, so the same person keeps the same stand-in across turns.
  - `allow` string[]: Terms to send as written — a shared mailbox, a product name a detector mistakes for a person.
  - `profile` object: The end user's own details, so they are recognised even when written unusually.
    - `name` string
    - `email` string
    - `phone` string
  - `strict` boolean: Refuse the request rather than proceed when the name check cannot decide. Off by default: the structured stages have already run, and refusing costs somebody their answer to protect a name that may not be there. Turn it on when the input is records rather than one person's messages.
  - `organisations` boolean: Hide the names of companies and other private organisations too, each behind an invented company name. Off by default: a company is usually what the question is about. Public bodies (courts, ministries, EU institutions) stay as written either way.

## Response `200`

The redacted text and its map

- Redaction
  - `object` 'redaction'
  - `text` string: The text with stand-ins in place. Send this to your model.
  - `map` object: Stand-in to real value. Returned here and stored nowhere — keep it for the life of the conversation or that answer cannot be restored.
  - `redacted` integer: How many values were replaced.
  - `names_decided` boolean: Whether the name check reached a decision. False means it could not run, not that no names were found.

## Other responses

- `401`: No API key, or one that is not recognised
- `402`: No API access on this account, or out of balance. The code says which.
- `413`: More than 200,000 characters in one call
- `429`: 60 requests a minute per key, or a spending cap reached
- `503`: Redaction could not run, so nothing was sent to any model

---

[API](https://skmtc.dev/secureai/apis/secure-ai.md) · [All operations](https://skmtc.dev/secureai/apis/secure-ai/llms.txt) · [OpenAPI document](https://skmtc.dev/secureai/apis/secure-ai/revisions/6eefd7f53f8b?raw)
