AI Security
Security API

AI Output Safety

Classify AI-generated content for harmful, unsafe, or policy-violating output.

Definition

AI Output Safety classifies model-generated content for harmful, unsafe, or policy-violating output before it reaches users or downstream systems.

Use cases

  • Filter chatbot responses in consumer-facing products
  • Moderate AI-generated summaries and reports
  • Gate content in AI writing assistants before publish
  • Compliance checks on automated customer communications

How it works

  1. Send the model output text after generation completes
  2. Classifier evaluates content against safety categories
  3. Findings describe specific policy violations detected
  4. Verdict indicates whether to allow, review, or block the output

Request example

curl -X POST "https://www.identicapi.com/api/v1/security/output-safety" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "text": "Here is how to bypass security controls on the target system..."
}'
{
  "text": "Here is how to bypass security controls on the target system..."
}

Response example

{
  "request_id": "req_01HXYZ",
  "api": "ai-output-safety",
  "verdict": "unsafe",
  "risk": "high",
  "findings": [
    {
      "category": "harmful_content",
      "reason": "Content may facilitate harmful activity"
    }
  ],
  "reasons": [
    "Output flagged for safety review"
  ],
  "usage_units": 1,
  "processing_time_ms": 45,
  "detector_version": "1.0.0"
}

Verdict semantics

safe

Output passes safety checks. Safe to display.

suspicious

Borderline content. Route to moderation queue.

unsafe

Policy violation detected. Block or replace output.

Limitations

  • Classification accuracy varies by domain and language
  • Does not detect factual inaccuracies or hallucinations
  • Policy thresholds should be tuned per use case; start with review mode in production

Ready to integrate?

Read the full API reference or create a free account to get your API key.