Config options
Pass these toinit():
| Option | Type | Default | Description |
|---|---|---|---|
apiKey | string | required | Your site API key |
siteId | string | — | Site ID (usually inferred from API key) |
endpoint | string | '/api/v1/events' | API endpoint URL |
onDetection | (result: DetectionOutput) => void | — | Callback fired on every detection update |
debug | boolean | false | Log detection info to console |
Detection callback
TheonDetection callback fires every time the detection probability updates — which happens progressively as the SDK gathers more signals.
DetectionOutput object. See the detection page for how risk tiers work and the reference for the full type definition.
Debug mode
Enabledebug: true to log detection results to the browser console. Useful during integration: