Skip to main content


US & EU
The PII Redaction model lets you minimize sensitive information about individuals by automatically identifying and removing it from your transcript. Personal Identifiable Information (PII) is any information that can be used to identify a person, such as a name, email address, or phone number. To redact PII from text rather than audio, see Redact PII from Text Using LLM Gateway. When you enable the PII Redaction model, your transcript will look like this:
  • With hash substitution: Hi, my name is ####!
  • With entity_name substitution: Hi, my name is [PERSON_NAME]!
You can also Create redacted audio files to replace sensitive information in the audio with a beeping sound or silence.
Redacted PropertiesPII only redacts words in the text property. Properties from other features may still include PII, such as entities from Entity Detection or summary from Summarization.

Quickstart

Enable Topic Detection by setting redact_pii to True in the JSON payload.Set redact_pii_policies to specify the information you want to redact. For the full list of policies, see PII policies.Set redact_pii_sub to specify the replacement for redacted information.

Example output

PII Redaction Using LLM GatewayIf you would like the option to use LLM Gateway for custom PII redaction, check out this guide Redact PII from Text Using LLM Gateway.

Create redacted audio files

In addition to redacting sensitive information from the transcription text, you can also generate a version of the original audio file with the PII “beeped” out. You can optionally use silence instead of a beep by setting override_audio_redaction_method to "silence" within redact_pii_audio_options.
Redacted Audio EndpointRetrieve the redacted audio file using the transcript_id for a transcript where redact_pii_audio was enabled during submission:Redacted audio files are only available for 24 hours. Make sure to download the file within this time frame.
To create a redacted version of the audio file, set redact_pii_audio to True on the JSON payload. Set redact_pii_audio_quality to specify the quality of the redacted audio file.Use the transcript ID to poll the GET redacted audio endpoint every few seconds to check the status of the redacted audio. Once the status is redacted_audio_ready, you can retrieve the audio URL from the API response.
Maximum Audio File SizeYou can only create redacted versions of audio files if the original file is smaller than 1 GB. For files over 1 GB, see the Downsampling guide to reduce file size before redaction.
Redacted Audio for Silent FilesBy default, audio redaction provides redacted audio URLs only when speech is detected. However, if your use-case specifically requires redacted audio files even for silent audio files without any dialogue, you can now opt to receive these URLs. Enable this by setting the optional parameter "return_redacted_no_speech_audio": true within redact_pii_audio_options in your POST request body.

Example output

Return the unredacted transcript

If your workflow needs both the redacted and unredacted transcripts, you can request both in a single transcription call by setting redact_pii_return_unredacted to true. This avoids the need to send a second API request without redaction.
This is an opt-in convenience featureEnabling PII Redaction by itself does not return the unredacted transcript — the default behavior is to redact text, words, and utterances and return only the redacted versions. The unredacted transcript is only returned when you explicitly set redact_pii_return_unredacted to true, and redact_pii must also be true (otherwise the request is rejected with a 400).Only use this feature if your workflow specifically requires access to both the redacted and unredacted transcripts from the same request. If you only need the redacted transcript, leave this parameter off. When redact_pii_return_unredacted is false or omitted, the three unredacted_* fields are not included in the response at all.
When redact_pii_return_unredacted is true, the response includes three additional fields alongside their redacted counterparts:
Set redact_pii_return_unredacted to True alongside the existing PII parameters. The completed transcript will include unredacted_text, unredacted_words, and unredacted_utterances in addition to the redacted versions.

Example response

Static Entity Redaction

PII Redaction detects broad categories of sensitive information (names, phone numbers, and the other PII policies) using an AI model. Static Entity Redaction complements this for cases where you need to redact specific, predefined terms that may not fit into general PII categories — for example a proprietary product name, an internal project codename, or an org-specific identifier. You supply a map of redact_static_entities, where each key is a label and each value is a list of exact terms to redact. Any matching term in the transcript is replaced with that label, on top of the standard PII redaction.
Static Entity Redaction matches the exact terms you provide (tolerant of casing, surrounding punctuation, and minor spacing/hyphenation variation from the transcription), rather than inferring a category. For example, listing ["Bearclaw"] redacts Bearclaw, bearclaw, Bearclaw's, Bear-claw, and Bear claw — but a different internal tool name you didn’t list is not redacted. You define and manage the term list.redact_static_entities requires redact_pii to be true. It runs as the final step of redaction, after the standard PII pass.
The substitution follows your existing redact_pii_sub setting:
  • entity_name — the matched term is replaced with [LABEL] (the uppercased map key).
  • hash — the matched term’s characters are replaced with #.
When redacted audio is enabled (redact_pii_audio: true), the matched terms are also bleeped from the audio output alongside standard PII.
Pass redact_static_entities alongside your existing PII parameters. Each key is the redaction label; each value is the list of terms to match.

Example response

Matched terms appear redacted inline in text, words, and utterances, exactly like standard PII. There are no additional response fields. For the transcript “Our internal tool Bearclaw is powered by Universal-3.5 Pro.” with the request above:

API reference

Request

Response

The response also includes the request parameters used to generate the transcript.

Request for Redacted Audio

In the request URL, replace transcript_id with the ID of the transcript where redact_pii_audio is set to true.

Response for Redacted Audio

PII policies

Granular location policies

The location_* policies let you redact specific parts of a location without redacting the rest — for example, redacting street addresses while keeping city and state visible. Which policy matches a given span is shape-dependent:
  • A full contiguous mailing address (street, city, state, and ZIP together, e.g. 145 Windsor St., Toronto, ON M5A 2P5) is treated as a single location_address span. To redact it, include location_address in redact_pii_policies.
  • A standalone location fragment is tagged as its specific subtype. A lone street redacts as location_address_street, a lone city as location_city, a lone state as location_state, a lone country as location_country, a lone ZIP as location_zip, and coordinates as location_coordinate.
  • A combined phrase that mixes location parts without forming a full address — for example Toronto, Canada — is treated as a single generic location span. To redact it, include the broad location policy in redact_pii_policies. The granular subtypes alone won’t match it.
These granular subtypes apply to PII redaction only. Entity Detection returns all location references under the single location entity type, not as location_address, location_city, and so on.

Troubleshooting

Make sure that at least one PII policy has been specified in your request, using the redact_pii_policies parameter. If you’re still experiencing issues, please reach out to our support team for assistance.
There could be several reasons why your webhook isn’t being sent, such as a misconfigured URL, an unreachable endpoint, or an issue with the authentication headers. Double-check your request and ensure that the webhook_url parameter is included with a valid URL that can be reached by AssemblyAI’s API. If you’re using custom authentication headers, ensure that the webhook_auth_header_name and webhook_auth_header_value parameters are included and are correct. If you’re still having issues, please contact our support team for assistance.
By default, the API returns redacted audio files in MP3 format, a lossy format. Lossy formats remove audio information to reduce file size, which may cause a reduction in quality. The difference may be particularly noticeable if the submitted audio is in a lossless file format. To retain as much quality as possible, you can instead return your redacted audio files in a lossless format, by setting redact_pii_audio_quality to wav.