Skip to content
BLAZLE
Start free
Back to docs

API Reference

POST /intercept/prompt

POST/api/v1/intercept/prompt

Scans an LLM prompt for hardcoded secrets, PII, database credentials, private keys, and other policy violations.

Request

{
  "prompt": string   // Required. The full prompt text to scan.
}

Response

{
  "schema_version": "1.1",
  "request_id": string,
  "allowed": boolean,
  "risk_score": number,         // 0–100
  "risk_rating": string,        // "Low" | "Medium" | "High" | "Critical"
  "treatment_strategy": string, // "Accept" | "Mitigate" | "Redact" | "Avoid"
  "priority": string,           // "Critical" | "High" | "Normal"
  "priority_reason": string,    // only when priority is above risk_rating
  "redacted_payload": string,   // full prompt, secrets and PII masked (never cut)
  "redacted_preview": string,   // first 2,000 characters of redacted_payload
  "truncated": boolean,         // true when redacted_preview was cut
  "findings": [{
    "rule_name": string,
    "match_text": string,       // never empty when allowed = false
    "description": string,
    "severity": string,         // this finding alone, same scale as risk_rating
    "score": number | null,     // 0–1 for AI and plain-language rules
    "spans": [{ "start": number, "end": number, "text": string }]
  }],
  "latency_ms": number,         // server processing time, 2 decimals
  "latency_us": number,         // the same, in microseconds
  "cold_start": boolean         // true for a one-off slower warm-up request
}
  • latency_msis the time BLAZLE spent on the server. Time measured by your client (for example the Playground's round trip) also includes the network.
  • spans offsets count characters (Unicode code points) of the payload you sent; span text is masked likeredacted_payload. For the AI detector, which has no exact match, the span is the sentence it most likely reacted to.
  • Schema 1.1 only adds fields to 1.0, and latency_ms now has decimals. The same response shape is returned by /intercept/command, /diff and /output.