shieldapi.check_prompt
Detect prompt injection in text. Analyzes across 4 categories (direct injection, encoding tricks, exfiltration, indirect injection) with 200+ detection patterns. Designed for real-time inline usage before processing untrusted user input. Returns boolean verdict, confidence score (0-1), matched patterns with evidence, and decoded content if encoding obfuscation was detected. Response time <100ms p95.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | The text to analyze for prompt injection | |
| context | No | Context hint for sensitivity: user-input (default), skill-prompt (higher tolerance), system-prompt (highest sensitivity) |