Data quality, right from your codebase.
Developer quickstart
The Cipher SDK lets you validate survey responses, detect fraud, and ensure data quality programmatically. Install it, add your API key, and score your first response in minutes.
import { Cipher } from '@surbee/cipher'const cipher = new Cipher({ apiKey: process.env.CIPHER_API_KEY })// Score your first survey responseconst result = await cipher.validate({responses: [{ question: 'Would you recommend us?', answer: 'Yes' },],behavioralMetrics: tracker.getMetrics(),})console.log(result.score) // 0.94console.log(result.recommendation) // 'keep'
Validate any response
Pass survey responses with behavioral metrics. Get instant quality scores, recommendations, and detailed check results.
const result = await cipher.validate({responses: submission.responses,behavioralMetrics: tracker.getMetrics(),})result.score // 0.94result.recommendation // 'keep'
Tune tiers and thresholds
Pick a validation tier from 1 to 5 and set your own score thresholds for auto-reject and review. Higher tiers add AI-content, VPN, and fraud-ring checks.
const cipher = new Cipher({apiKey: process.env.CIPHER_API_KEY,tier: 4,thresholds: { fail: 0.4, review: 0.7 },})
Batch and fraud-ring detection
Validate many responses in one call. Turn on cross-respondent analysis (tier 5) to surface coordinated fraud rings across the whole batch.
const batch = await cipher.validateBatch({submissions,crossAnalysis: true, // tier 5})batch.summary.avgScorebatch.fraudIndicators?.fraudRingScore
Fast checks, no AI
Tiers 1–2 run the behavioral, timing, device, and content checks with no AI models, so they return in milliseconds. Everything still runs on our servers, so the scoring logic never ships to your client and can’t be reverse-engineered.
const cipher = new Cipher({apiKey: process.env.CIPHER_API_KEY,tier: 2, // rule-based, no AI})// Fast, server-side, no AI latencyconst result = await cipher.validate({responses: submission.responses,deviceInfo: tracker.getDeviceInfo(),})
Try the Cipher SDK
Add enterprise-grade fraud detection to your project in one line.