Redaction

Redaction removes sensitive information from your transcripts.

redact boolean. Default: false

Deepgram’s Redaction feature redacts sensitive information.

Enable Feature

To enable redaction, use the following parameter in the query string when you call Deepgram’s /listen endpoint:

redact=OPTION

Hosted

Redaction has the following options available for those using Deepgram's hosted endpoint (api.deepgram.com).

Pre-Recorded

Redacting Many Entities

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 personally identifiable information, including names and locations
  • numbers (or true): Aggressively redacts strings of numbers
Redacting Specific Entities

When submitting pre-recorded audio to Deepgram's hosted endpoint (api.deepgram.com), you may select the types of entities you wish to redact from over 50 supported entity types. This powerful functionality allows you total control over what is redacted in your transcript.

Some options include credit_card, credit_card_expiration, cvv, and email_address.

View all options here: Supported Entity Types

Making the Request

You can enable redaction by adding redact=OPTION as a query parameter.

Multiple types of entities can be redacted with the syntax redact=option_1&redact=option_2. For example, redact=email_address&redact=pci.

To transcribe audio from a file on your computer, run the following cURL command in a terminal or your favorite API client.

curl \
  --request POST \
  --header 'Authorization: Token YOUR_DEEPGRAM_API_KEY' \
  --header 'Content-Type: audio/wav' \
  --data-binary @youraudio.wav \
  --url 'https://api.deepgram.com/v1/listen?redact=OPTION'

:eyes: Replace YOUR_DEEPGRAM_API_KEY with your Deepgram API Key.

Streaming

🚧

Live streamed redaction is not currently available when using smart formatting on our Nova or enhanced tier models.

This feature is available for English only (all available regions).

When live-streaming audio to Deepgram's hosted endpoint, redaction options include:

  • pci: Redacts sensitive credit card information, including credit card number, expiration date, and CVV
  • numbers (or true): Aggressively redacts strings of numerals
  • ssn: Redacts social security numbers

Multiple redaction values can be sent: redact=pci&redact=numbers

On-Prem Deployments

Deepgram's on-prem deployments offer the following set of redaction options. The available options do not differ between pre-recorded and live-streamed audio.

Possible options include:

  • pci: Redacts sensitive credit card information, including credit card number, expiration date, and CVV
  • numbers (or true): Aggressively redacts strings of numerals
  • ssn: Redacts social security numbers

Multiple redaction values can be sent: redact=pci&redact=numbers

🚧

Live streamed redaction is not currently available when using smart formatting on our Nova or enhanced tier models.

This feature is available for English only (all available regions).

Results

Hosted

Redaction has the following output for those using Deepgram's hosted endpoint (api.deepgram.com).

Pre-Recorded

For pre-recorded audio, 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 choose to 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" would appear in your transcript as "My social security number is [SSN_1] and his is [SSN_2]".

Example with redact=pci&redact=pii:

TruthBefore redactAfter redact
my credit card number is four four four four nine nine nine nine three three three three two two two two with an expiration date of one twenty three and the cvv code is one one one i live at one two three main street dallas texas seven five two zero one my phone number is five five five two one two nine three three three my date of birth is july twelfth nineteen seventy sixmy credit card number is four four four four nine nine nine nine three three three three two two two two with an expiration date of one twenty three and the cvv code is one one one i live at one two three main street dallas texas seven five two zero one my phone number is five five five two one two nine three three three my date of birth is july twelfth nineteen seventy sixmy credit card number is [CREDIT_CARD_1] with an expiration date of [CREDIT_CARD_EXPIRATION_1] and the cv code is [CVV_1] i live at [LOCATION_ADDRESS_1] my phone number is [PHONE_NUMBER_1] my date of birth is [DOB_1]

Live Streaming Audio

For streaming audio, redaction replaces redacted content with asterisks (*).

Example with redact=pci:

TruthBefore redactAfter redact
my credit card number is four four four four nine nine nine nine three three three three two two two two with an expiration date of one twenty three and the cvv code is one one one i live at one two three main street dallas texas seven five two zero one my phone number is five five five two one two nine three three three my date of birth is july twelfth nineteen seventy sixmy credit card number is four four four four nine nine nine nine three three three three two two two two with an expiration date of one twenty three and the cvv code is one one one i live at one two three main street dallas texas seven five two zero one my phone number is five five five two one two nine three three three my date of birth is july twelfth nineteen seventy sixmy credit card number is * with an expiration date of * and the cvv code is * i live at * main street dallas texas * my phone number is five five five two one two nine three three three my date of birth is july twelfth nineteen seventy six

On-Prem Deployments

Redaction replaces redacted content with asterisks (*).

Example with redact=pci:

TruthBefore redactAfter redact
my credit card number is four four four four nine nine nine nine three three three three two two two two with an expiration date of one twenty three and the cvv code is one one one i live at one two three main street dallas texas seven five two zero one my phone number is five five five two one two nine three three three my date of birth is july twelfth nineteen seventy sixmy credit card number is four four four four nine nine nine nine three three three three two two two two with an expiration date of one twenty three and the cvv code is one one one i live at one two three main street dallas texas seven five two zero one my phone number is five five five two one two nine three three three my date of birth is july twelfth nineteen seventy sixmy credit card number is * with an expiration date of * and the cvv code is * i live at * main street dallas texas * my phone number is five five five two one two nine three three three my date of birth is july twelfth nineteen seventy six

Use Cases

Some examples of use cases for redaction include:

  • Customers who handle sensitive customer information, including social security numbers or credit card information, and need to ensure this data isn’t stored for security and compliance purposes.

ℹ️

By default, Deepgram applies its general AI model, which is a good, general purpose model for everyday situations. To learn more about the customization possible with Deepgram's API, check out the Deepgram API Reference.