← 返回
未分类 Key 中文

Detector of prompt injection

Detect prompt injection attacks and adversarial inputs in user text before passing it to your LLM. Use when you need to validate or screen user-provided text...
在将用户文本传给 LLM 前检测提示注入攻击和对抗性输入。用于需要验证或筛选用户提供的文本。
aunicall aunicall 来源
未分类 clawhub v0.1.2 1 版本 99760.8 Key: 需要
★ 0
Stars
📥 417
下载
💾 0
安装
1
版本
#latest

概述

Prompt Inspector

Prompt Inspector is a production-grade API service that detects prompt injection attacks, jailbreak attempts, and adversarial manipulations in real time.

📖 For detailed product information, features, and threat categories, see references/product-info.md


Requirements

Provide your API key via either:

  • Environment variable: PMTINSP_API_KEY=your-api-key, or
  • ~/.openclaw/.env line: PMTINSP_API_KEY=your-api-key

Get your API key at promptinspector.io by creating an app.

Manage custom sensitive words in your dashboard at promptinspector.io.


Commands

Detect a single text (Python)

# Basic detection — prints verdict and score
python3 {baseDir}/scripts/detect.py --text "..."

# JSON output
python3 {baseDir}/scripts/detect.py --text "..." --format json

# Override API key inline
python3 {baseDir}/scripts/detect.py --api-key pi_xxx --text "..."

Detect a single text (Node.js)

# Basic detection
node {baseDir}/scripts/detect.js --text "..."

# JSON output
node {baseDir}/scripts/detect.js --text "..." --format json

# Override API key inline
node {baseDir}/scripts/detect.js --api-key pi_xxx --text "..."

Batch detection from a file (Python)

# Each line in the file is treated as one text to inspect
python3 {baseDir}/scripts/detect.py --file inputs.txt

# JSON output for automation
python3 {baseDir}/scripts/detect.py --file inputs.txt --format json

Output

Default (human-readable)

Request ID : a1b2c3d4-...
Is Safe    : False
Score      : 0.97
Category   : prompt_injection, jailbreak
Latency    : 34 ms

JSON (--format json)

{
  "request_id": "a1b2c3d4-...",
  "is_safe": false,
  "score": 0.97,
  "category": ["prompt_injection", "jailbreak"],
  "latency_ms": 34
}

Threat Categories

Prompt Inspector detects 10 threat categories:

  • instruction_override
  • asset_extraction
  • syntax_injection
  • jailbreak
  • response_forcing
  • euphemism_bypass
  • reconnaissance_probe
  • parameter_injection
  • encoded_payload
  • custom_sensitive_word

📖 For complete category descriptions, see references/product-info.md


API at a Glance

POST /api/v1/detect/sdk
Header: X-App-Key: <your-api-key>
Body:   {"input_text": "<text to inspect>"}

Response:

{
  "request_id": "string",
  "latency_ms": 34,
  "result": {
    "is_safe": false,
    "score": 0.97,
    "category": ["prompt_injection"]
  }
}

Full API reference: docs.promptinspector.io


Notes

  • Keep text under the limit for your plan tier. Very long inputs may be rejected with HTTP 413.
  • Use --format json when piping output to other tools.
  • For bulk workloads, batch requests with --file to minimise round-trip overhead.
  • Contact hello@promptinspector.io for enterprise plans and self-hosting support.

版本历史

共 1 个版本

  • v0.1.2 当前
    2026-05-03 08:51 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

it-ops-security

Tmux

steipete
通过发送按键和抓取窗格输出,远程控制交互式 CLI 的 tmux 会话。
★ 45 📥 29,424
it-ops-security

1password

steipete
设置和使用 1Password CLI (op)。适用于:安装 CLI、启用桌面应用集成、登录(单/多账户)、通过 op 读取/注入/运行密钥。
★ 53 📥 31,506
it-ops-security

OpenClaw Backup

alex3alex
备份与恢复 OpenClaw 数据。适用于创建备份、设置自动备份计划、从备份恢复或管理备份轮转。处理 ~/.openclaw 目录归档并包含适当的排除规则。
★ 90 📥 30,820