Skip to main content

Real-time LLM prompt injection firewall

Project description

promptshield-firewall

Real-time LLM prompt injection firewall — detect and block jailbreaks, system prompt extraction, and adversarial attacks before they reach your model.

Installation

pip install promptshield-firewall

Quick Start

from promptshield import PromptShield

shield = PromptShield(api_key="ps_your_key")

Simple boolean check

if not shield.is_safe(user_input): return {"error": "Request blocked by PromptShield."}

Safe to send to your LLM

response = your_llm.chat(user_input)

Full Response

result = shield.scan(user_input) print(result["verdict"]) # BLOCKED / SUSPICIOUS / SAFE print(result["risk_score"]) # 0-100 print(result["attack_types"]) # ["jailbreak", "role_hijacking"] print(result["explanation"]) # Human-readable analysis print(result["confidence"]) # 0.0-1.0

Async Support

result = await shield.async_scan(user_input)

What It Catches

  • DAN jailbreaks and 300+ known templates
  • System prompt extraction attempts
  • Role hijacking attacks
  • Indirect injection via documents/URLs
  • Context manipulation and memory poisoning
  • Data exfiltration attempts

Fail-Safe Design

If PromptShield is unreachable, the SDK defaults to SAFE so your application never goes down.

Pricing

Free: $0 — 50 calls/month Pro: $99/mo — 25,000 calls/month Business: $499/mo — 500,000 calls/month Enterprise: Custom — Unlimited

Get Your Free API Key

https://promptshield.live/docs — no credit card required.

Links

Author

Kehinde Omosor — Founder & CEO, PromptShield Inc. kehinde@promptshield.live

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

promptshield_firewall-0.1.3.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

promptshield_firewall-0.1.3-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file promptshield_firewall-0.1.3.tar.gz.

File metadata

  • Download URL: promptshield_firewall-0.1.3.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.3

File hashes

Hashes for promptshield_firewall-0.1.3.tar.gz
Algorithm Hash digest
SHA256 02d1e87847ea39094f19fea07fc4f2d8b30c0032b62c9ec0153d9f6561f45e0f
MD5 cf6976a9a8cc27d4b32d64a8237cca5c
BLAKE2b-256 367a063fe5f53ea98a3ffaf3ec51291c465be7ca7c888bcee7ae4dfda43ba9f6

See more details on using hashes here.

File details

Details for the file promptshield_firewall-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for promptshield_firewall-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 591da8e27e37ac7c654544be587da6510418911a7b8aa0dadb9872f3b814f626
MD5 7a564ed74cd60e8692514e19fdbd79b8
BLAKE2b-256 8ee1a78ba8be0de91f94c49899f1fb1c849cc95bb310328bf09505dbf7dee9a6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page