How it works
The parts of an integration, the two processing modes and the life of a measurement.
Neccessory measures vital signs from a short face video taken with an ordinary front camera. The person sits still in front of the camera for 30–60 seconds; Neccessory returns heart rate, breathing rate, a stress index and, depending on the metric sets you enable, HRV, blood pressure, SpO2 and face analysis.
The parts of an integration
| Part | What it does |
|---|---|
| Your app | Runs the Web SDK or the iOS SDK: opens the camera, guides the person, shows live values and the result |
| Your server | Keeps the key secret. Creates cloud sessions or model grants, stores results, receives webhooks |
| Neccessory | Computes metrics in cloud mode, stores measurements, delivers webhooks, bills tokens |
Processing modes
Every measurement runs in one of two modes. Both return the same measurement result, and the SDK code differs by one option.
| Cloud | On-device | |
|---|---|---|
| Where metrics are computed | Neccessory servers | The person's device |
| Access | Self-serve: create a key and start | After your on-device access request is approved |
| SDKs | Web SDK | Web SDK, iOS SDK |
| Network during the measurement | Required: the face video is sent for processing | Not required |
| Result stored | Automatically | When your server submits it |
| Attested result | Yes, for complete measurements with usable quality | No |
| Recorded video processing | Yes | — |
| Metric sets | Chosen per key and per session | All available metrics |
| Billing | Tokens per measurement | No token charges |
Choose cloud to start today, to get results your server can trust, to process recorded video, or to keep the app light.
Choose on-device when face video must not leave the device, or when the app has to measure without a stable connection. Apply for access in the console — see API keys. You can build on cloud mode while the request is reviewed and switch later.
A cloud measurement, step by step
- The person opens the measurement screen in your app and agrees to the processing of their face video.
- Your server creates a session with
POST /sdk/v1/cloud/sessionsand returns it to the app. The session token is valid for 5 minutes and for one measurement. - The app passes the session to the SDK and starts the measurement. The SDK opens the camera, streams the video for processing and reports live heart rate and hints.
- The measurement ends when the session duration is reached (20–180 seconds, 60 by default). The app receives the result; Neccessory stores it and sends a webhook to your server.
Details: Cloud sessions.
An on-device measurement, step by step
- In the browser, your server first creates a model grant with
POST /sdk/v1/models/grantand passes it to the page. The iOS SDK needs no grant. - The SDK computes everything on the device. In the Web SDK you end the measurement with
stop(); the iOS SDK ends after the configured duration. - The app sends the result to your server, and your server stores it with
POST /sdk/v1/measurements.
Details: Web SDK, iOS SDK, Measurements API.
Security model
- The secret stays on your server. Apps receive only short-lived credentials: a session token (cloud) or a model grant (on-device web).
- Every server call is signed. Requests carry an HMAC signature over the method, path, time and body — see Authentication.
- Cloud results cannot be altered by the client. Neccessory computes and stores them; your server reads them from the API. See Attested results.
Timing
| Moment | When |
|---|---|
| Live heart rate | About 10 seconds after the start |
| First HRV estimate | About 15 seconds of clean signal |
| Recommended duration | 30–60 seconds. HRV, stress and blood pressure are more stable with longer measurements |
| Final result, cloud | Shortly after the measurement ends |