Features / Cipher SDK

Built to protect your data quality, right from your codebase.

pnpm add @surbee/cipher
validate.ts
import { Cipher } from '@surbee/cipher'
const cipher = new Cipher({
apiKey: 'sk_live_...',
tier: 4,
})
Quick Start

Initialize in seconds

Import the SDK, add your API key, and choose a validation tier. That's all you need to get started.

const result = await cipher.validate({
responses: submission.answers,
behavioral: tracker.getMetrics(),
device: tracker.getDeviceInfo(),
})
result.score // 0.94
result.recommendation // 'keep'
Core API

Validate any response

Pass survey responses with behavioral metrics. Get instant quality scores, recommendations, and detailed check results.

const cipher = new Cipher({
tier: 4,
thresholds: {
fail: 0.4, // Auto-reject below
review: 0.7, // Flag for review
},
checks: {
aiContent: true,
vpnDetection: true,
}
})
Configuration

Custom thresholds & checks

Set your own score thresholds for auto-reject and review. Enable or disable specific checks like AI detection or VPN blocking.

// Validate multiple responses at once
const results = await cipher.validateBatch(
responses,
{ parallel: 10 }
)
// Cross-respondent fraud detection
const rings = await cipher.detectFraudRings(
projectId
)
Advanced

Batch & fraud ring detection

Validate hundreds of responses in parallel. Detect coordinated fraud rings across your entire dataset with cross-respondent analysis.