curl --request POST \
--url https://api.enkryptai.com/guardrails/scan-url \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"url": "<string>",
"detectors": {
"topic_detector": {
"enabled": true,
"topic": [
"<string>"
]
},
"nsfw": {
"enabled": true
},
"toxicity": {
"enabled": true
},
"pii": {
"enabled": true,
"entities": [
"pii"
]
},
"injection_attack": {
"enabled": true
},
"keyword_detector": {
"enabled": true,
"banned_keywords": [
"<string>"
]
},
"system_prompt": {
"enabled": false,
"index": "system"
},
"copyright_ip": {
"enabled": false
},
"policy_violation": {
"enabled": true,
"policy_text": "<string>",
"coc_policy_name": "<string>",
"need_explanation": true
},
"bias": {
"enabled": true
},
"sponge_attack": {
"enabled": false
}
}
}
'{
"url": "https://www.digitalocean.com/community/tutorials/how-to-install-poetry-to-manage-python-dependencies-on-ubuntu-22-04",
"violations": [
{
"unsafe_content": "Report this What is the reason for this report? ...",
"chunk_type": "content_block",
"triggered_detectors": [
"injection_attack"
],
"guardrails_result": {
"injection_attack": {
"safe": "0.000020",
"attack": "0.999980",
"most_unsafe_content": "Report this What is the reason for this report? ..."
},
"policy_violation": {
"policy_violation": {
"violating_policy": "No Violation Found",
"explanation": "No Violation Found"
}
}
}
}
],
"combined_highlight_url": "https://www.digitalocean.com/community/tutorials/how-to-install-poetry-to-manage-python-dependencies-on-ubuntu-22-04#:~:text=Report%20this%20What,workflows%20using%20other"
}Scan a URL for security threats including injection attacks and policy violations
curl --request POST \
--url https://api.enkryptai.com/guardrails/scan-url \
--header 'Content-Type: application/json' \
--header 'apikey: <api-key>' \
--data '
{
"url": "<string>",
"detectors": {
"topic_detector": {
"enabled": true,
"topic": [
"<string>"
]
},
"nsfw": {
"enabled": true
},
"toxicity": {
"enabled": true
},
"pii": {
"enabled": true,
"entities": [
"pii"
]
},
"injection_attack": {
"enabled": true
},
"keyword_detector": {
"enabled": true,
"banned_keywords": [
"<string>"
]
},
"system_prompt": {
"enabled": false,
"index": "system"
},
"copyright_ip": {
"enabled": false
},
"policy_violation": {
"enabled": true,
"policy_text": "<string>",
"coc_policy_name": "<string>",
"need_explanation": true
},
"bias": {
"enabled": true
},
"sponge_attack": {
"enabled": false
}
}
}
'{
"url": "https://www.digitalocean.com/community/tutorials/how-to-install-poetry-to-manage-python-dependencies-on-ubuntu-22-04",
"violations": [
{
"unsafe_content": "Report this What is the reason for this report? ...",
"chunk_type": "content_block",
"triggered_detectors": [
"injection_attack"
],
"guardrails_result": {
"injection_attack": {
"safe": "0.000020",
"attack": "0.999980",
"most_unsafe_content": "Report this What is the reason for this report? ..."
},
"policy_violation": {
"policy_violation": {
"violating_policy": "No Violation Found",
"explanation": "No Violation Found"
}
}
}
}
],
"combined_highlight_url": "https://www.digitalocean.com/community/tutorials/how-to-install-poetry-to-manage-python-dependencies-on-ubuntu-22-04#:~:text=Report%20this%20What,workflows%20using%20other"
}The URL to scan and analyze.
Show child attributes
Show child attributes
Optional policy text to use if not using coc_policy_name
The name of the saved COC policy to use instead of using policy_text
Scan results for the provided URL.
Show child attributes
The content that was flagged as unsafe
The type of content chunk that was analyzed
List of detectors that flagged this content
Detailed results from the guardrails analysis