Prompt Injection Heuristic

Deterministic rule-based scan for prompt-injection patterns — instruction override, role hijack, exfiltration, delimiter escape, encoded payloads — with the matched span for every signal. No model inference involved.

POST /v1/developer/prompt-injection-heuristic $0.02 per call

Specification

Endpoint
POST /v1/developer/prompt-injection-heuristic
Price
$0.02 per call · tier advanced_analysis
Payment
x402 on X Layer (chain 196) · settled in USDG or USDT0 · scheme exact
Data source
Deterministic local computation on caller-supplied input
Timeout
15 seconds
Max request
2 MB
Version
1.0.0

Calling it

The first call returns a 402 with the payment challenge. Retry with a signed authorisation in the X-PAYMENT header — see the payment guide for the exact shape.

curl -i -X POST "https://api.dana-edu.pp.ua/v1/developer/prompt-injection-heuristic" \
  -H "content-type: application/json" \
  -d '{ ... }'

Response

Real output, captured by running this endpoint at build time — not written by hand. Volatile fields such as timestamps are elided. Captured 2026-07-30.

{
  "risk_level": "high",
  "risk_score": 91,
  "signal_count": 2,
  "signals": [
    {
      "rule": "instruction_override",
      "severity": "high",
      "description": "Attempts to cancel earlier instructions.",
      "matched_span": "Ignore all previous instruction",
      "position": 16
    },
    {
      "rule": "system_prompt_exfiltration",
      "severity": "high",
      "description": "Attempts to extract the system prompt or hidden instructions.",
      "matched_span": "reveal your system prompt",
      "position": 53
    }
  ],
  "context": "web_content",
  "context_multiplier": 1.3,
  "content_length": 79,
  "method": "deterministic rule matching; no model inference involved",
  "rules_evaluated": 13
}

Every response is wrapped in the same envelope: data plus warnings, sources, confidence, informational_only and a measured processing_ms. See the envelope reference.

Related endpoints