PII Redaction - API
PII redaction hides personal information in the transcripts and summaries VideoSDK creates. Names, phone numbers, card numbers, addresses and other personal details are replaced with tags before anything is saved.
Before: Hi, I am Rahul Verma, call me on 98765 43210.
After: Hi, I am [NAME_1], call me on [PHONE_NUMBER_1].
It works with realtime transcription and post transcription (recordings, HLS and livestreams). It is off by default, and you turn it on per transcription.
Enable PII redaction
Add a piiRedaction object to the transcription settings you already send.
"piiRedaction": {
"enabled": true,
"entities": ["name", "phone_number", "email_address"],
"redactSpeakerNames": false
}
| Field | Type | Default | Description |
|---|---|---|---|
enabled | boolean | false | Turns PII redaction on. |
entities | string[] | all types | The PII types to hide. Leave it out to hide every type. |
redactSpeakerNames | boolean | false | Replaces speaker labels (participant names) with Speaker 1, Speaker 2, and so on. |
customEntities | object[] | none | Your own PII types, hidden along with entities. See Custom PII types. |
Supported PII types
| Type | Tag | Hides |
|---|---|---|
name | [NAME_n] | Names of people, including first names, last names and nicknames |
phone_number | [PHONE_NUMBER_n] | Phone and mobile numbers, in digits or said as words |
email_address | [EMAIL_ADDRESS_n] | Email addresses, including spoken forms like "rahul at gmail dot com" |
location_address | [LOCATION_ADDRESS_n] | Street and postal addresses with house number, street, area and PIN or ZIP code |
dob | [DOB_n] | Dates of birth |
government_id | [GOVERNMENT_ID_n] | Aadhaar, PAN, passport, voter ID, driving licence, SSN and other national IDs |
bank_account | [BANK_ACCOUNT_n] | Bank account numbers |
credit_card | [CREDIT_CARD_n] | Card numbers, CVVs and card expiry dates |
upi_id | [UPI_ID_n] | UPI IDs and payment handles such as name@okaxis |
password | [PASSWORD_n] | Passwords, PINs, OTPs and other security codes |
long_number | [NUMBER_n] | Other long numbers (8+ digits), such as order or reference numbers |
These are not hidden:
- company, product and brand names
- well-known public figures
- a city, state or country on its own
- ordinary dates and times, amounts of money and job titles
To hide any of these as well, add a custom PII type for it.
Custom PII types
You can also hide your own kinds of information, such as employee IDs or project names, by describing them.
"piiRedaction": {
"enabled": true,
"customEntities": [
{ "name": "employee_id", "description": "Employee IDs like EMP-12345", "tag": "EMPLOYEE_ID" },
{ "name": "project_name", "description": "Internal project code names" }
]
}
| Field | Required | Rules |
|---|---|---|
name | yes | Lowercase letters and _, starting with a letter, up to 30 characters. It can't be a built-in type. |
description | yes | What to find, 1 to 200 characters. Name the format and give an example. |
tag | no | Capital letters and _, starting with a letter, up to 30 characters. It can't be a built-in tag. Defaults to name in capitals. |
You can add up to 10 custom types. Their values are tagged like built-in ones, and the same value gets the same tag: [EMPLOYEE_ID_1], [PROJECT_NAME_1].
Custom types are hidden in addition to the built-in types. Use entities to choose which built-in types are hidden alongside them; leave it out to hide all of them.
Realtime transcription
Add piiRedaction to the body of Start Realtime Transcription.
{
"roomId": "abcd-efgh-ijkl",
"piiRedaction": { "enabled": true }
}
The stored transcript and its summary are redacted.
Live captions shown to participants during the meeting are not redacted.
Post transcription
Add piiRedaction inside the transcription object of Start Recording. Transcription must be enabled.
{
"roomId": "abcd-efgh-ijkl",
"transcription": {
"enabled": true,
"summary": { "enabled": true },
"piiRedaction": { "enabled": true, "redactSpeakerNames": true }
}
}
The same transcription object works in:
- Start HLS Stream
- Start Livestream
- Create a Room, under
autoStartConfig.recording.transcriptionorautoStartConfig.hls.transcription.customEntitiesis not supported inautoStartConfigyet.
Every output format (txt, vtt, srt, tsv and json, including the word timings) and the summary are redacted.
Output
- The same value gets the same tag everywhere in the transcript and summary. A first or last name on its own ("Rahul") gets the full name's tag ("Rahul Verma") when only one person has that name.
- A number said in words and in digits ("four four five five", "4455") gets one tag.
With redactSpeakerNames: true:
Speaker 1: Hi, I am [NAME_1]. My card is [CREDIT_CARD_1].
Speaker 2: Thanks [NAME_1]. Can I send the receipt to [EMAIL_ADDRESS_1]?
Fetch a Realtime Transcription and Fetch a Post Transcription & Summary return the piiRedaction settings that were used. Custom types come back with their tag filled in.
{
"id": "475dbf4c-a2e4-4dd3-9891-ad0c8dc26ccc",
"status": "completed",
"transcriptionFilePaths": { "txt": "https://cdn.videosdk.live/transcriptions/dummy/dummy.txt" },
"summarizedFilePaths": { "txt": "https://cdn.videosdk.live/transcriptions/dummy/dummy-summary.txt" },
"piiRedaction": {
"enabled": true,
"redactSpeakerNames": true,
"customEntities": [
{ "name": "project_name", "description": "Internal project code names", "tag": "PROJECT_NAME" }
]
}
}
Errors
An invalid piiRedaction gets HTTP 400, and nothing is started.
| Message | Fix |
|---|---|
piiRedaction must be an object | Send an object, not a string or list. |
piiRedaction.enabled must be true or false | Use a boolean. |
piiRedaction.redactSpeakerNames must be true or false | Use a boolean. |
piiRedaction.entities must be a non-empty list of: name, phone_number, ... | Send at least one type from the list. |
To enable piiRedaction, please enable transcription | Set transcription.enabled to true (recording, HLS, livestream and auto-start). |
piiRedaction.customEntities must be a list of at most 10 types | Send a list of up to 10 objects. |
piiRedaction.customEntities[i] must be an object with name and description | Send each custom type as an object, not a string. |
piiRedaction.customEntities[i].name must be lowercase letters and underscores ... | Use a name like employee_id that isn't a built-in type. |
piiRedaction.customEntities[i].description must be 1 to 200 characters | Add a short description. |
piiRedaction.customEntities[i].tag must be capital letters and underscores ... | Use a tag like EMPLOYEE_ID that isn't a built-in tag. |
piiRedaction.customEntities names and tags must be unique | Give each custom type its own name and tag. |
If redaction can't be completed, the transcription status is failed and the transcription-failed webhook is sent. No unredacted transcript is saved.
Languages
Works with English, Indian English, Hindi, French and Spanish, including mixed speech such as Hindi with English words.
Billing
PII redaction is billed as AI inference usage (per token), on top of the transcription price.
Limitations
- Detection is automatic and can miss a value, especially when speech-to-text mishears a word. Review redacted transcripts before sharing them where that matters.
- A name spelled differently by speech-to-text ("Raul" for "Rahul") gets its own tag.
- Custom types are found from your description, so a clear description with an example works best.
Got a Question? Ask us on discord

