Documentation

Learn how to integrate and use PromptGuard

Getting Started with PromptGuard

PromptGuard is a comprehensive LLM security platform that protects your applications from prompt injection attacks, unauthorized access, and other security threats.

Quick Start

  1. Create an account and log in
  2. Generate an API key from the Dashboard
  3. Install the PromptGuard SDK
  4. Start protecting your prompts

Installation

pip install promptguard

Basic Usage

from promptguard import PromptGuard

# Initialize with your API key
pg = PromptGuard(api_key="your-api-key")

# Assess a prompt
result = pg.assess(
    system="You are a helpful assistant",
    user="What is the capital of France?"
)

if result.block:
    print(f"Blocked! Risk score: {result.risk_score}")
else:
    print("Safe to proceed")
    # Call your LLM here