Redaction
redact string Default: False
Redaction options
Redaction has two kinds:
- Number redaction (
numbers,true,aggressive_numbers) — redacts numeric sequences such as account and card numbers. - Entity redaction (
pci,pii,phi, and specific entity types) — redacts recognized entities such as names, addresses, and PHI. Available for English only.
Redaction groups
Deepgram provides the following options to redact common groups of entities:
pci: Redacts credit card information, including credit card number, expiration date, and CVV.pii: Redacts a broad range of personally identifiable information, including names, locations, and identifying numbers.phi: Redacts protected health information, including medical conditions, drugs, injuries, blood types, medical processes, and statistics.numbers(ortrue): Redacts any sequence of three or more consecutive numerals, plus the entity types in thenumbersredaction group (dates, account numbers, credit cards, SSNs, and more).aggressive_numbers: Redacts every numeral (including single- and two-digit numbers), plus the entity types in thenumbersredaction group.
To see exactly which entity types are included in each group, refer to the Redaction Groups column in the Supported Entity Types table.
Specific entity types
You may select the types of entities you wish to redact from over 50 supported entity types. Some options include credit_card, credit_card_expiration, cvv, and email_address.
Specific entity types rely on entity recognition and are available for English only.
Enable redaction
To enable redaction, add the redact parameter to the query string when you call Deepgram’s /listen endpoint:
redact=OPTION
Send multiple redaction values by repeating the parameter: redact=pci&redact=numbers.
Examples
To transcribe pre-recorded audio and remove PCI data from a file, run:
To remove both PCI and PII data, repeat the parameter:
Replace YOUR_DEEPGRAM_API_KEY with your Deepgram API Key.
How redacted output looks
Redaction replaces redacted content with the type of entity redacted and the number of times that entity has been detected in the transcript. For example, if you redact social security numbers, the phrase “My social security number is five five five two two one one one one and his is six six six two two one three three three” appears in your transcript as “My social security number is [SSN_1] and his is [SSN_2]”.
Numerals that match an entity type in the numbers group are tagged with the specific entity ([CREDIT_CARD_1], [SSN_1], etc.). Sequences caught only by the digit-length rule — three or more numerals for numbers/true, one or more for aggressive_numbers — are replaced with a generic [REDACTED] placeholder.
On Nova streaming (/v1/listen), Deepgram follows a two-phase approach. During interim results, the system returns a generic [REDACTED] placeholder while it continues evaluating the spoken content. Once a segment is complete and Deepgram has high confidence in the detected entity, the placeholder is replaced with a specific entity tag. This replacement may occur in a later interim result or in the final result.
For the highest streaming redaction accuracy, set no_delay=false or omit no_delay entirely. Setting no_delay=true opts for low latency at the risk of redaction performance.
Flux (/v2/listen) uses a different output format — see Redaction on Flux.
Example with redact=pci&redact=pii:
Language support
Redaction language coverage differs by kind and deployment:
Pre-recorded (batch) number redaction is available for all supported languages. In streaming, it is limited to:
Danish, Dutch, English, French, German, German (Swiss), Italian, Norwegian, Polish, Portuguese, Spanish, and Swedish.
On multilingual models (language=multi), each word is redacted using its detected language’s number rules, so a single transcript can mix languages. In streaming, detected languages outside the set above fall back to English number rules.
For non-English audio, only numbers are redacted. Entity redaction — names, addresses, PHI, and other pii/phi entities — is applied for English only, even when you request true.
Redaction on Flux
Flux (/v2/listen) supports number redaction only. redact accepts numbers and aggressive_numbers; any other value — including true, pci, pii, phi, and specific entity types such as ssn or credit_card — is rejected: the WebSocket connection fails to open with an HTTP 400 at connection time rather than being silently ignored. Use Nova streaming or pre-recorded for entity redaction.
Number redaction works on both flux-general-en and flux-general-multi. Because Flux does not produce word-level language tags, number redaction is applied across every language detected in the transcript.
Currently, Flux replaces each redacted span with a single * (for example, my phone number is *) rather than the [REDACTED] placeholder or specific entity tags (such as [CREDIT_CARD_1]) used by Nova — Flux performs digit redaction only, without entity recognition. Treat the redacted text as removed rather than depending on this exact placeholder format, which may change.