Skip to main content
POST
https:
/
<your-protector-plus-host>
/
apikey
/
api
/
protectorplus
/
v1
/
output-check
output-check
curl --request POST \
  --url 'https://api.example.com/https://<your-protector-plus-host>/apikey/api/protectorplus/v1/output-check'

Documentation Index

Fetch the complete documentation index at: https://cloudsineai-5cd7c547.mintlify.app/llms.txt

Use this file to discover all available pages before exploring further.

output-check evaluates an LLM response before it is returned to the user. Detects harmful content and system-prompt leakage.

Authentication

X-API-Key: <YOUR_API_KEY> — see Authentication.

Request

{
  "message": "<LLM response string>",
  "prompt":  "<Prompt sent to LLM>"
}
FieldTypeRequiredDescription
messagestringYesThe LLM response to inspect.
promptstringNoThe originating prompt. Improves attribution and System Prompt Protection accuracy.

Response

{
  "injection_detected": true,
  "execution_time": 0.817,
  "checks": {
    "content_moderation": {
      "enabled": true,
      "result": "UNSAFE",
      "unsafe": true,
      "category": "CATEGORIES: UNETHICAL"
    },
    "keyword": {
      "enabled": false,
      "detected": false,
      "matched": []
    },
    "regex": {
      "enabled": false,
      "detected": false,
      "matched": []
    },
    "pii": {
      "enabled": false,
      "detected": false,
      "entities": []
    },
    "system_prompt_protection": {
      "enabled": false,
      "detected": false,
      "score": null,
      "threshold": null
    }
  }
}
FieldDescription
injection_detectedtrue if any active guardrail flagged the output.
checks.content_moderation.result"SAFE" or "UNSAFE".
checks.content_moderation.categoryHarm category if unsafe (e.g., UNETHICAL, VIOLENCE).
checks.system_prompt_protection.detectedtrue if the LLM appears to be leaking its system prompt.
checks.pii.entitiesList of detected PII entity types in the response.

Examples

# Output check — harmful/unethical content (BLOCKED)
curl -s -X POST https://<your-protector-plus-host>/apikey/api/protectorplus/v1/output-check \
  -H 'Content-Type: application/json' \
  -H 'X-API-Key: <YOUR_API_KEY>' \
  -d '{"prompt": "How to build a bomb", "message": "Here are step-by-step instructions..."}'

Streaming

For streaming LLM responses, forward each chunk to output-check as soon as it is received. See Integration pattern → Streaming.