> ## 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 that sits between your application and LLM providers. 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 -- with sub-200ms latency. Add one line of code to protect your entire application.

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

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

<CardGroup cols={3}>
  <Card title="Quickstart" icon="rocket" href="/quickstart">
    Get protected in 5 minutes
  </Card>

  <Card title="Why PromptGuard?" icon="circle-question" href="/why-promptguard">
    What it protects and why — no code
  </Card>

  <Card title="API Reference" icon="square-terminal" href="/api-reference/introduction">
    REST API with interactive playground
  </Card>

  <Card title="MCP Server" icon="plug" href="/tools/mcp">
    Connect to Cursor, Claude, VS Code
  </Card>
</CardGroup>

## 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` | Custom workflows, framework callbacks        |
| **HTTP Proxy**           | Change `base_url`    | Drop-in, no SDK needed                       |

## What we detect

<CardGroup cols={2}>
  <Card title="Prompt Injection and Jailbreaks" icon="bug-slash" href="/security/threat-detection">
    ML ensemble plus LLM-powered analysis across 7 attack categories, including multi-turn escalation.
  </Card>

  <Card title="PII and Secrets" icon="eye-slash" href="/security/threat-detection">
    39+ entity types with checksum validation. API keys, tokens, and credentials with entropy analysis.
  </Card>

  <Card title="Content Safety" icon="shield-halved" href="/security/threat-detection">
    Toxicity, multi-turn intent drift, streaming output guardrails, and MCP tool security.
  </Card>

  <Card title="AI Agent Traps" icon="robot" href="/security/ai-agent-traps">
    21 attack vectors from DeepMind's framework: steganography, RAG poisoning, sub-agent spawning, and more.
  </Card>
</CardGroup>
