Complete guide to integrate FrameSentinel fraud detection
Sign up and get your API key from the dashboard:
API_KEY=your-api-key-here API_URL=https://api.framesentinel.com/v1
TypeScript/JavaScript:
npm install @framesentinel/sdk
Python:
pip install framesentinel
import { FrameSentinelClient } from '@framesentinel/sdk';
const client = new FrameSentinelClient({
apiKey: 'your-api-key',
apiUrl: 'https://api.framesentinel.com/v1'
});
// Create verification session
const session = await client.createSession('user-123');
// Upload video
await client.uploadVideo(session.session_id, videoFile);
// Get results
const result = await client.pollUntilComplete(session.session_id);
console.log('Risk Level:', result.risk_level);
console.log('Score:', result.authenticity_score);/api/v1/sessionsCreate a new verification session
Request:
{
"user_id": "user-123",
"metadata": {
"ip_address": "192.168.1.1"
}
}Response:
{
"session_id": "sess_abc123",
"state": "PENDING",
"created_at": "2024-01-15T10:30:00Z"
}/api/v1/sessions/{id}/uploadUpload video for analysis
Request:
multipart/form-data with video file
Response:
{
"session_id": "sess_abc123",
"state": "PROCESSING",
"upload_complete": true
}/api/v1/sessions/{id}/resultGet verification results
Request:
No body required
Response:
{
"session_id": "sess_abc123",
"state": "COMPLETED",
"authenticity_score": 0.95,
"risk_level": "VERIFIED",
"detection_flags": {
"deepfake_detected": false,
"replay_detected": false,
"injection_detected": false,
"face_swap_detected": false,
"metadata_anomaly": false
}
}All API requests require authentication using your API key in the header:
X-API-Key: your-api-key-here
Keep your API key secure. Never expose it in client-side code or public repositories.