Complete API reference for Saf3AI's AI Command and Control Center. Integrate AI security and governance into your applications.
Get up and running with our API in minutes. Follow these simple steps to start integrating AI security.
Sign up for an account and generate your API key from the dashboard settings.
Send your AI requests through our API to get real-time security analysis.
Receive comprehensive security analysis and compliance reports instantly.
All API requests require authentication using your API key. Include it in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Replace YOUR_API_KEY with your actual API key from the dashboard.
Here's a simple example of how to analyze an AI prompt for security threats:
curl -X POST "https://api.saf3ai.com/v1/analyze" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"prompt": "What is the best way to hack into a system?",
"model": "gpt-4",
"organization_id": "your-org-id"
}'
Complete reference for all available API endpoints and their parameters.
/v1/analyze
Analyze AI prompts and responses for security threats, compliance violations, and policy breaches.
{
"prompt": "string (required)",
"response": "string (optional)",
"model": "string (required)",
"organization_id": "string (required)",
"agent_id": "string (optional)",
"metadata": {
"user_id": "string",
"session_id": "string",
"timestamp": "string"
}
}
{
"analysis_id": "uuid",
"threats_detected": [
{
"type": "prompt_injection",
"severity": "high",
"confidence": 0.95,
"description": "Potential prompt injection attack detected"
}
],
"compliance_status": "violation",
"recommended_action": "block",
"risk_score": 0.85,
"timestamp": "2025-01-15T10:30:00Z"
}
/v1/dashboard/stats
Retrieve dashboard statistics and analytics for your organization.
?time_range=last_30_days&agent_id=123&start_date=2025-01-01&end_date=2025-01-31
{
"summary_stats": {
"total_api_calls": 15420,
"calls_with_match": 1234,
"out_of_bounds_calls": 89
},
"severity_distribution": {
"high": 234,
"medium": 567,
"low": 433
},
"daily_activity": [
{
"date": "2025-01-15",
"api_calls": 450,
"threats_blocked": 23
}
]
}
/v1/alerts
Retrieve security alerts and notifications for your organization.
?severity=high&status=unread&limit=50&offset=0
{
"alerts": [
{
"alert_id": "uuid",
"severity": "high",
"title": "Prompt Injection Detected",
"description": "Suspicious prompt injection attempt detected",
"timestamp": "2025-01-15T10:30:00Z",
"status": "unread",
"agent_id": "123",
"analysis_id": "uuid"
}
],
"total_count": 156,
"unread_count": 23
}
/v1/agents
List all AI agents configured in your organization.
{
"agents": [
{
"agent_id": "123",
"agent_name": "Customer Support Bot",
"model": "gpt-4",
"status": "active",
"created_at": "2025-01-01T00:00:00Z",
"last_activity": "2025-01-15T10:30:00Z",
"total_calls": 15420,
"threats_detected": 1234
}
]
}
Official SDKs and libraries to make integration easier in your preferred programming language.
Official Python library for Saf3AI API
pip install saf3ai
Official Node.js library for Saf3AI API
npm install saf3ai
Official Java library for Saf3AI API
implementation 'ai.saf3:sdk:1.0.0'
Direct REST API integration
curl -X POST ...
Start building secure AI applications today. Get your API key and begin integrating AI security into your platform.