Method: projects.locations.templates.sanitizeUserPrompt

Sanitizes User Prompt.

HTTP request


The URLs use gRPC Transcoding syntax.

Path parameters

Parameters
name

string

Required. Represents resource name of template e.g. name=projects/sample-project/locations/us-central1/templates/templ01

Request body

The request body contains data with the following structure:

JSON representation
{
  "userPromptData": {
    object (DataItem)
  },
  "multiLanguageDetectionMetadata": {
    object (MultiLanguageDetectionMetadata)
  }
}
Fields
userPromptData

object (DataItem)

Required. User prompt data to sanitize.

multiLanguageDetectionMetadata

object (MultiLanguageDetectionMetadata)

Optional. Metadata related to Multi Language Detection.

Response body

Sanitized User Prompt Response.

If successful, the response body contains data with the following structure:

JSON representation
{
  "sanitizationResult": {
    object (SanitizationResult)
  }
}
Fields
sanitizationResult

object (SanitizationResult)

Output only. Sanitization Result.

Authorization scopes

Requires the following OAuth scope:

  • https://www.googleapis.com/auth/cloud-platform

For more information, see the Authentication Overview.

IAM Permissions

Requires the following IAM permission on the name resource:

  • modelarmor.templates.useToSanitizeUserPrompt

For more information, see the IAM documentation.