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
- Create an account and log in
- Generate an API key from the Dashboard
- Install the PromptGuard SDK
- Start protecting your prompts
Installation
pip install promptguardBasic 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