๐ Quick Start
Get up and running with the rPPG API in under 5 minutes.
Installation
Install the SDK via npm:
npm install rppg-api-client
Or with yarn:
yarn add rppg-api-client
Basic Usage
Here's the fastest way to analyze a video and get vital signs:
import { RPPGClient } from 'rppg-api-client';
// Initialize the client
const client = new RPPGClient({
apiKey: 'your-api-key-here',
baseUrl: 'https://api.yourdomain.com/api'
});
// Analyze a video file
async function analyzeVideo(videoFile) {
try {
// One-line video analysis with automatic polling
const vitals = await client.analyzeVideo(videoFile);
console.log('Heart Rate:', vitals.heart_rate, 'bpm');
console.log('Respiratory Rate:', vitals.respiratory_rate, 'breaths/min');
console.log('HRV:', vitals.hrv);
return vitals;
} catch (error) {
console.error('Analysis failed:', error.message);
}
}
// Use with a file from input
const fileInput = document.querySelector('input[type="file"]');
fileInput.addEventListener('change', async (e) => {
const file = e.target.files[0];
const results = await analyzeVideo(file);
});
What You'll Get
The analyzeVideo() method returns vital signs data:
{
"session_id": "sess_20251026_abc123",
"heart_rate": 72.5,
"respiratory_rate": 16.2,
"hrv": 45.3,
"blood_pressure": null,
"confidence": 0.89,
"timestamp": "2025-10-26T12:34:56Z",
"processing_time_ms": 32450
}
Video Requirements
For accurate results, ensure your video:
- โ Shows face clearly (frontal view preferred)
- โ Has good, consistent lighting
- โ Is 10-30 seconds in duration
- โ Subject remains relatively still
- โ File size under 100MB
- โ Format: MP4, WebM, MOV, or AVI
Next Steps
- Authentication โ - Get your API key
- SDK Libraries โ - Advanced SDK features
- API Reference โ - Full endpoint documentation
- Code Examples โ - More implementation patterns
Need Help?
- Check the Testing & Sandbox for test credentials
- Review Code Examples for common use cases
- See Rate Limits for API quotas