Quick Start
Get the embed widget running in 3 steps
-
Add the script tag
Add this to the
<body>of your HTML page:
html<script src="https://cdn.circadify.com/widget.js"></script> -
Initialize the widget
html<script> Circadify.init({ apiKey: 'ck_live_your_api_key_here', onComplete: (result) => { console.log('Heart Rate:', result.heartRate, 'BPM'); console.log('Confidence:', Math.round(result.confidence * 100) + '%'); }, }); </script> -
That's it!
A floating "Check Vitals" button will appear in the bottom-right corner. Click it to start a scan.
Tip
Get your API key from the Developer Portal.
Complete Example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>My App</title>
</head>
<body>
<h1>Welcome</h1>
<p>Click the button in the corner to check your vitals.</p>
<script src="https://cdn.circadify.com/widget.js"></script>
<script>
Circadify.init({
apiKey: 'ck_live_your_api_key_here',
buttonText: 'Check Vitals',
theme: {
accentColor: '#4F46E5',
},
onComplete: (result) => {
const lines = [`Heart Rate: ${Math.round(result.heartRate)} BPM`];
// spo2 is optional — only render it when present.
if (result.spo2 != null) {
lines.push(`SpO2: ${Math.round(result.spo2)}%`);
}
lines.push(`Confidence: ${Math.round(result.confidence * 100)}%`);
alert(lines.join('\n'));
},
onError: (error) => {
console.error('Scan failed:', error.message);
},
});
</script>
</body>
</html>htmlNext Steps
- Configuration — All available options for
Circadify.init() - Events & Callbacks — Handle results, errors, and cancellations
- Styling — Customize the widget appearance