Cloud Data Loss Prevention (Cloud DLP) is now a part of Sensitive Data Protection. The API name remains the same: Cloud Data Loss Prevention API (DLP API). For information about the services that make up Sensitive Data Protection, see Sensitive Data Protection overview.
When no InfoTypes or CustomInfoTypes are specified in this request, the system will automatically choose what detectors to run. By default this may be all types, but may change over time as detectors are updated.
Only the first frame of each multiframe image is redacted. Metadata and other frames are omitted in the response.
HTTP request
POST https://dlp.googleapis.com/v2/{parent=projects/*/locations/*}/image:redact
Projects scope, no location specified (defaults to global): projects/{projectId}
The following example parent string specifies a parent project with the identifier example-project, and specifies the europe-west3 location for processing data:
The full resource name of the inspection template to use. Settings in the main inspectConfig field override the corresponding settings in this inspection template.
The merge behavior is as follows:
Singular field: The main field's value replaces the value of the corresponding field in the template.
Repeated fields: The field values are appended to the list defined in the template.
Sub-messages and groups: The fields are recursively merged.
deidentifyTemplate
string
The full resource name of the de-identification template to use. Settings in the main imageRedactionConfigs field override the corresponding settings in this de-identification template. The request fails if the type of the template's deidentifyConfig is not imageTransformations.
Response body
If successful, the response body contains an instance of RedactImageResponse.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-10-10 UTC."],[],[]]