blockReason property

String? blockReason
getter/setter pair

The reason why the prompt was blocked.

Output only. Possible string values are:

  • "BLOCKED_REASON_UNSPECIFIED" : The blocked reason is unspecified.
  • "SAFETY" : The prompt was blocked for safety reasons.
  • "OTHER" : The prompt was blocked for other reasons. For example, it may be due to the prompt's language, or because it contains other harmful content.
  • "BLOCKLIST" : The prompt was blocked because it contains a term from the terminology blocklist.
  • "PROHIBITED_CONTENT" : The prompt was blocked because it contains prohibited content.
  • "MODEL_ARMOR" : The prompt was blocked by Model Armor.
  • "IMAGE_SAFETY" : The prompt was blocked because it contains content that is unsafe for image generation.

Implementation

core.String? blockReason;