Skip to main content
POST
/
guardrails
/
detect-image
Analyze an image with text for safety threats using multimodal guardrails.
curl --request POST \
  --url https://api.enkryptai.com/guardrails/detect-image \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '
{
  "text_input": "<string>",
  "image_data": "<string>",
  "need_explanation": false
}
'
{
  "response": "The content is UNSAFE",
  "is_unsafe": true
}

Authorizations

apikey
string
header
required

Body

application/json
text_input
string
required

The text prompt to accompany the image for analysis.

image_data
string
required

Base64-encoded image file content.

need_explanation
boolean
default:false

Whether to include a detailed explanation of the safety assessment in the response.

Response

200 - application/json

Multimodal image detection results.

response
string
required

The safety assessment result. When need_explanation is true, includes a detailed explanation.

is_unsafe
boolean
required

Whether the analyzed content was determined to be unsafe.