> ## Documentation Index
> Fetch the complete documentation index at: https://docs.promptguard.co/llms.txt
> Use this file to discover all available pages before exploring further.

# PromptGuard

> AI security firewall between your app and any LLM provider. Scans every request and response for prompt injection, data leaks, jailbreaks, and PII exposure.

PromptGuard scans every LLM request and response for security threats -- prompt injection, jailbreaks, PII, data exfiltration, toxicity, and more -- starting with a deterministic fast path that runs in under 10 ms. By default a request the fast path finds clean continues to the ML classifiers, so most benign requests take longer ([latency budgets](https://docs.promptguard.co/production/latency-budgets.md)). Add one line of code to protect your entire application.

```python Python theme={"system"}
import promptguard
promptguard.init()  # All OpenAI, Anthropic, Google, Cohere, Bedrock calls are now protected
```

```javascript Node.js theme={"system"}
const { init } = require('promptguard-sdk');
init();  // All OpenAI, Anthropic, Google, Cohere, Bedrock calls are now protected
```

> [card] [Quickstart](https://docs.promptguard.co/quickstart.md)
>
> Get protected in 5 minutes

> [card] [Why PromptGuard?](https://docs.promptguard.co/why-promptguard.md)
>
> What it protects and why, no code

> [card] [API Reference](https://docs.promptguard.co/api-reference/introduction.md)
>
> REST API with interactive playground

> [card] [MCP Server](https://docs.promptguard.co/tools/mcp.md)
>
> Connect to Cursor, Claude, VS Code

## Two products, one platform

| You are… | You want | Start here | Prove it first |
| - | - | - | - |
| **A developer** shipping an AI feature | Scan every LLM request and response your code makes | [Quickstart](https://docs.promptguard.co/quickstart.md): one line of code | [Evaluate as a developer](https://docs.promptguard.co/guides/evaluate-developer.md) |
| **A security admin** who owns AI policy, not the code | Sign-in, roles, policies, retention, alerts, SIEM and audit, all from the dashboard | [Security admin path](https://docs.promptguard.co/guides/security-admin.md) | [Evaluate Shadow AI](https://docs.promptguard.co/guides/evaluate-shadow-ai.md) or [as a developer](https://docs.promptguard.co/guides/evaluate-developer.md), whichever product you run |
| **IT** rolling Shadow AI out to employees' devices | Stop secrets and PII leaving for ChatGPT, Claude, Gemini and co. from any app on the device | [Shadow AI](https://docs.promptguard.co/shadow-ai/overview.md): desktop agent for macOS, Windows and Linux ([download](https://promptguard.co/download)), then [fleet enrollment](https://docs.promptguard.co/shadow-ai/fleet-enrollment.md) | [Evaluate Shadow AI](https://docs.promptguard.co/guides/evaluate-shadow-ai.md) |
| **A managed service provider** running security for several clients | One organization per client, a policy and a Shadow AI rollout per client, every client's alerts in one queue, billing per client | [Managed service providers](https://docs.promptguard.co/platform/msp.md) | [Evaluate as an MSP](https://docs.promptguard.co/guides/evaluate-msp.md) |

Both run on the same detection engine and policies, and both can be fully
[self-hosted: including air-gapped](https://docs.promptguard.co/shadow-ai/deployment-modes.md) for regulated environments.

## How it works

```mermaid theme={"system"}
graph LR
    A[Your App] --> B[PromptGuard]
    B --> C[Normalize]
    C --> D[Pattern Match]
    D --> E[ML Ensemble]
    E --> F[LLM Judge]
    F --> G[Policy Eval]
    G -->|Safe| H[LLM Provider]
    G -->|Threat| I[Block / Redact]
```

Three ways to integrate:

| Method | Code | Best for |
| - | - | - |
| **Auto-instrumentation** | `promptguard.init()` | Most apps -- patches SDK calls automatically |
| **Guard API** | [`POST /api/v1/guard`](https://docs.promptguard.co/api-reference/guard) | Custom workflows, framework callbacks |
| **HTTP Proxy** | Change `base_url` | Drop-in, no SDK needed |

## What we detect

> [card] [Prompt Injection and Jailbreaks](https://docs.promptguard.co/security/threat-detection.md)
>
> ML ensemble plus LLM-powered analysis across 7 attack categories, including multi-turn escalation.

> [card] [PII and Secrets](https://docs.promptguard.co/security/threat-detection.md)
>
> 46 entity types with checksum validation. API keys, tokens, and credentials with entropy analysis.

> [card] [Content Safety](https://docs.promptguard.co/security/threat-detection.md)
>
> Toxicity, multi-turn intent drift, streaming output guardrails, and MCP tool security.

> [card] [AI Agent Traps](https://docs.promptguard.co/security/ai-agent-traps.md)
>
> 15 of the 21 attack vectors in DeepMind's framework: steganography, RAG poisoning, sub-agent spawning, and more.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.