# SecurePass call redaction

Source: https://docs.autessa.com/docs/features/securepass

> SecurePass removes card numbers, SSNs, and other sensitive data from call recordings, in the audio and the transcript, with one API call.

# SecurePass call redaction

SecurePass removes card numbers, bank details, SSNs, and other sensitive data from call recordings. It redacts both the audio and the transcript.

## When to use it

- You record phone calls and need them PCI-safe before you store or share them.
- Your voice agent takes payments or personal details and you keep the recording.
- You send call audio to analytics, QA, or AI tools and want the sensitive parts gone first.

You don't need to build anything in Autessa. Any API key from your company works.

## Quickstart

1. [Get a free API key](https://builder.autessa.com/get-api-key). New accounts get $100 of free credits for your first month, no card needed. This developer key works for this feature; see [Keys](/docs/start/keys.md).
2. Send a recording to `POST /clients/call-redaction/redact`.
3. Download `redactedAudioUrl` and `transcriptUrl` from the response.

**curl:**

```bash
curl -X POST https://api.autessa.com/clients/call-redaction/redact \
  -H "Authorization: $AUTESSA_API_KEY" \
  -F "file=@call.wav"
```

**Python:**

```python
import os
import requests

with open("call.wav", "rb") as f:
    res = requests.post(
        "https://api.autessa.com/clients/call-redaction/redact",
        headers={"Authorization": os.environ["AUTESSA_API_KEY"]},
        files={"file": f},
        timeout=150,
    )
item = res.json()
print(item["status"], item.get("redactedAudioUrl"))
```

**TypeScript:**

```typescript
import { readFile } from "node:fs/promises";

const form = new FormData();
form.append("file", new Blob([await readFile("call.wav")]), "call.wav");

const res = await fetch("https://api.autessa.com/clients/call-redaction/redact", {
  method: "POST",
  headers: { Authorization: process.env.AUTESSA_API_KEY! },
  body: form,
});
const item = await res.json();
console.log(item.status, item.redactedAudioUrl);
```

**Java:**

```java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;

// Redact a recording you host at an https link.
var body = """
    {"audioUrl": "https://example.com/call.wav"}
    """;
var req = HttpRequest.newBuilder(URI.create("https://api.autessa.com/clients/call-redaction/redact"))
    .header("Authorization", System.getenv("AUTESSA_API_KEY"))
    .header("Content-Type", "application/json")
    .POST(HttpRequest.BodyPublishers.ofString(body))
    .build();
var res = HttpClient.newHttpClient().send(req, HttpResponse.BodyHandlers.ofString());
System.out.println(res.body());
```

A finished call returns `200` with the item:

```json
{
  "itemId": "V1StGXR8Z5",
  "status": "COMPLETED",
  "durationSeconds": 184.2,
  "redactedAudioUrl": "https://...",
  "transcriptUrl": "https://...",
  "redactions": [
    { "type": "CARD_NUMBER", "startMs": 61240, "endMs": 68910, "channel": 0 },
    { "type": "CARD_CVV", "startMs": 73020, "endMs": 74400, "channel": 0 }
  ]
}
```

If the call takes longer than `waitSeconds` (default and max 120), you get `202` with the `itemId`. Poll `GET /clients/call-redaction/items/{itemId}` or pass a `webhookUrl`.

To set options on a file upload, send them as JSON text in an `options` form field:

```bash
curl -X POST https://api.autessa.com/clients/call-redaction/redact \
  -H "Authorization: $AUTESSA_API_KEY" \
  -F "file=@call.wav" \
  -F 'options={"redact": ["CARD_NUMBER", "CARD_CVV"], "audioRedaction": "TONE"};type=application/json'
```

With a JSON body (`audioUrl`, `uploadId`, or `s3Uri`), put the options in the body itself.

## How it works

1. SecurePass transcribes the whole recording.
2. It finds sensitive values, including ones spoken in pieces, corrected, or read back.
3. It silences (or tones over) those stretches in the audio and masks them in the transcript.
4. Calls it is unsure about are marked `review.needsReview: true`. A person can approve them or redact more from the review queue.

SecurePass always redacts the full recording after the call. It does not redact live audio.

**What it redacts today:** `CARD_NUMBER`, `CARD_EXPIRY`, `CARD_CVV`, `SSN`, `BANK_ACCOUNT`, `ACCOUNT_NUMBER`, `DATE_OF_BIRTH`, `PHONE`, `EMAIL`, `ADDRESS`, `NAME`. Pick a subset with `redact`.

**Health and national ID types**: `MRN`, `HEALTH_PLAN_ID`, `HEALTH_PLAN_GROUP`, `MEDICARE_MBI`, `MEDICAID_ID`, `RX_NUMBER`, `CLAIM_NUMBER`, `MEDICATION`, `MEDICAL_CONDITION`, `PROVIDER_NAME`, `DATE_OF_SERVICE`, `NATIONAL_ID_MX`, `NATIONAL_ID_ES`, `NATIONAL_ID_OTHER`. English and Spanish. Off by default.

**Useful options**

| Option | What it does |
| --- | --- |
| `audioRedaction` | `SILENCE` (default) or `TONE`. |
| `paymentSegment` | With card types, silence the whole payment stretch. Default on. |
| `redactAllChannels` | On a two-channel call, silence each span on both channels. |
| `retainOriginalDays` | Keep the original audio 0 (default), 1, 7, or 30 days. |
| `keep` | Values never to redact, such as your own phone number, extension, address, ZIP, website, or email, or an order number your agent reads out. Up to 200 entries. Each is text, or `{"value": "62704", "type": "ZIP"}` to keep it only as that type. A kept value stays in wherever it is said. Card data is never partly kept, and a kept number shorter than five digits never keeps card, PIN, bank, SSN, or account digits on its own. |
| `tuning.mode` | `fast` (default) uses one speech recognizer. `thorough` combines two, which is slower but catches more. |
| `webhookUrl` | We POST the finished item to this https URL. |
| `externalId` | Your own ID for the call. Look it up later with `GET /clients/call-redaction/items?externalId=`. |

**Batches.** Send up to 1,000 recordings in one `POST /clients/call-redaction/jobs`, or point at a JSONL manifest, a zip file, or a storage bucket.

## Chunked uploads for voice frameworks

Voice agents built with Pipecat, LiveKit, or your own stack can upload audio during the call in chunks. Nothing is redacted until you finalize. Then SecurePass redacts the full recording, the same way as above.

1. `POST /clients/call-redaction/items` with `format` (`mulaw`, `pcm16`, `wav`, or `opus`), `sampleRateHz`, and `channels` (1 or 2). You get an `itemId`.
2. `PUT /clients/call-redaction/items/{itemId}/chunks/{seq}?channel=0` with raw audio bytes. Up to 5 MB per chunk. Re-sending the same `seq` and channel is safe.
3. `POST /clients/call-redaction/items/{itemId}/finalize`. If a chunk is missing you get `422` with the missing sequence numbers. Otherwise it answers `QUEUED` straight away, and the chunks are joined and redacted in the background.
4. `GET /clients/call-redaction/items/{itemId}` until the item is finished. Don't read the result straight after finalize.

```bash
ITEM=$(curl -s -X POST https://api.autessa.com/clients/call-redaction/items \
  -H "Authorization: $AUTESSA_API_KEY" -H "Content-Type: application/json" \
  -d '{"format":"mulaw","sampleRateHz":8000,"channels":2}' | jq -r .itemId)

curl -X PUT "https://api.autessa.com/clients/call-redaction/items/$ITEM/chunks/0?channel=0" \
  -H "Authorization: $AUTESSA_API_KEY" -H "Content-Type: application/octet-stream" \
  --data-binary @caller-0000.ulaw

curl -X POST "https://api.autessa.com/clients/call-redaction/items/$ITEM/finalize" \
  -H "Authorization: $AUTESSA_API_KEY" -H "Content-Type: application/json" -d '{}'
```

Set `language` (`en` or `es`) when you create the item if you know it. The second listen then decodes in that language instead of guessing.

An item that gets no chunk and no finalize for 72 hours is deleted: its status becomes `EXPIRED`, and its chunks are removed. If a recording can't be assembled it ends `FAILED`, and its chunks are removed too. Credit is checked at finalize and again when the work starts, so an item can end `FAILED` if credit ran out in between.

The [Pipecat](/docs/integrations/pipecat.md) and [LiveKit](/docs/integrations/livekit.md) integrations do this for you.

The evidence report checks every range against the redacted audio, including ranges a reviewer added by hand: three or more digits heard inside one fails it.

## Libraries

| Language | Package | Redact a file | Chunked upload |
| --- | --- | --- | --- |
| Python | `autessa-redact` | `Redact().redact_file(path, types=[...])` | `chunked(...)`, or `create_item(...)`, `append_chunk(...)`, `finalize(item_id)` |
| TypeScript | `@autessa/redact` | `new Redact().redactFile(path, { redact: [...] })` | `createUploader(...)`, or `createItem(...)`, `appendChunk(...)`, `finalize(itemId)` |
| Java | `com.autessa:autessa-redact` | `Redact.fromEnv().redactFile(path, options)` | `startChunkedUpload(...)`, or `createItem(...)`, `appendChunk(...)`, `finalize(itemId)` |

The types to redact are `types=` in Python and `redact` in TypeScript and Java (the same `redact` field in the API). Each library also has batch jobs, review, and item lookup calls.

```python
from autessa.redact import Redact

item = Redact().redact_file("call.wav", types=["CARD_NUMBER", "CARD_CVV"])
print(item.status, item.redacted_audio_url)
```

The libraries are in private preview and not yet on PyPI, npm, or Maven Central. Install from GitHub as each library's README describes, for example:

```bash
pip install "autessa-core @ git+https://github.com/Autessa-Inc/autessa-python#subdirectory=packages/autessa-core"
pip install "autessa-redact @ git+https://github.com/Autessa-Inc/autessa-python#subdirectory=packages/autessa-redact"
```

The HTTP API above works today.

## Limits

- On a two-channel item, one side can have no chunks: send `totalChunks` as `{"0": 12, "1": 0}` and that side is silence. At least one side needs chunks.

- Upload size: up to 200 MB per file on `/redact`. Use a link or upload ID for larger files.
- `waitSeconds`: up to 120. Longer calls finish in the background.
- Batches: up to 1,000 recordings per job when you list them inline.
- Chunks: up to 5 MB each.
- See [usage limits](/docs/guide/company/usage-limits.md).

## Pricing

| Item | Price |
| --- | --- |
| SecurePass API | $0.010/min |
| With health and national ID types | $0.015/min |
| Evidence report | $0.005 per audio minute |

LLM tasks use normal AI task pricing. Usage goes on your month-end invoice. See [Billing](/docs/start/billing.md).

## API reference

[SecurePass API](/docs/reference/securepass.md): every endpoint, field, and status.

## Benchmarks

[SecurePass Bench](/docs/benchmarks/securepass-bench.md) measures how often card and health data leak through redaction, in English and Spanish, on clean and degraded phone audio.

## Example

- [Redact a recording](https://github.com/Autessa-Inc/autessa-examples/tree/main/examples/redact-a-recording): one file, with curl, Python, TypeScript, or Java.
- [Pipecat payment line](https://github.com/Autessa-Inc/autessa-examples/tree/main/examples/pipecat-payment-line): a voice bot that takes a card payment and uploads the call in chunks.
- [LiveKit clinic assistant](https://github.com/Autessa-Inc/autessa-examples/tree/main/examples/livekit-clinic-assistant): health data redaction from a full session recording.

## Related

- [Start here](/docs/start.md)
- [AI Application Firewall](/docs/features/ai-application-firewall.md)
- [Pipecat integration](/docs/integrations/pipecat.md)
- [API keys and scopes](/docs/start/api-keys.md)

