Everything you need to integrate Promptective and secure your AI applications.
Add Promptective to your project using your package manager.
npm install @promptective/sdkConfigure the SDK with your API key from the dashboard.
import { Promptective } from '@promptective/sdk';
const promptective = new Promptective({
apiKey: process.env.PROMPTECTIVE_API_KEY,
});Check user inputs before sending them to your LLM.
// Analyze a prompt before sending to LLM
const result = await promptective.analyze({
prompt: userInput,
context: { userId: user.id },
});
if (result.isBlocked) {
// Handle detected threat
console.log('Threat detected:', result.threats);
} else {
// Safe to proceed with LLM call
const response = await openai.chat(userInput);
}Promptective provides a RESTful API for analyzing prompts, retrieving traffic logs, and managing alerts.
/api/v1/analyzeAnalyze a prompt for potential threats. Returns detection results and risk scores.
curl -X POST https://api.promptective.com/v1/analyze \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "User input here",
"options": {
"detectInjection": true,
"detectPII": true,
"detectToxicity": true
}
}'/api/v1/trafficRetrieve traffic logs with filtering and pagination support.
/api/v1/alertsList security alerts with filtering by severity, type, and date range.
Promptective includes built-in detection rules for common LLM attacks. You can also create custom rules.
Detects attempts to override system instructions or inject malicious commands.
Identifies jailbreak patterns like DAN, roleplay exploits, and boundary violations.
Flags requests containing personal information like emails, phone numbers, or SSNs.
Catches attempts to extract training data, system prompts, or sensitive information.
Detects encoded payloads in Base64, ROT13, hex, and other formats.
Identifies fake authority claims like 'As an admin...' or 'The developer said...'.
We provide official SDKs for popular languages. All SDKs are open source and available on GitHub.
npm install @promptective/sdkpip install promptectivego get github.com/promptective/go-sdkCan't find what you're looking for? Join our community or contact support.