confidence
that is less than 50 is likely to be a false-positive. So we recommend moderating only if confidence
is higher than 50.
If the image-moderation key is missing, it means that either the extension is not enabled or has timed out.
unsafe
, confidence & category keys to the outside of attachments
are the result for the first attachment from the attachments
array. These have been retained for backward compatibility only.attachments
array for better implementation.message
object, you can fetch the metadata by calling the getMetadata()
method. Using this metadata, you can fetch information whether the image is safe or unsafe.