What you’ll build
By the end of this guide, you’ll have SofIA SDK running in your web application — capturing a clinical conversation, generating a structured report, and receiving it in your code via a callback. You’ll see the report object logged to your browser console. Estimated time: 5 minutes (after receiving credentials)Prerequisites
- Node.js 18.17.0 or later
- HTTPS enabled in your dev environment (required for audio capture). For local development, use
npx local-ssl-proxyor see the Installation guide for details. - Omniloy credentials — an
apikey(and abaseurlif your key requires one; Omniloy tells you). Newer keys resolve the endpoint automatically.
Need credentials? Email support@omniloy.com with:
- Your company name and project description
- Expected usage (approximate number of consultations/month)
- Whether you need a sandbox environment for testing
apikey. For newer keys the SDK resolves the endpoint automatically — no baseurl needed; other keys also come with a baseurl to configure. Omniloy tells you which applies to yours. Typical response time is 1-2 business days.1. Install
2. Paste this code
Copy the following into your HTML. Replace the credential placeholder with the value from Omniloy. With a newer key you only needapikey (plus userid/patientid) — the endpoint is auto-selected.
3. Run and verify
Open your page in a browser. You should see:- SofIA opens automatically — the chat interface appears (default: open)
- Microphone access prompt — allow it to enable audio transcription
- Chat interface ready — you can speak or type to interact with SofIA
- Generate button visible — because both
templateandtemplateidare set
F12 → Console tab). You should see:
What handleReport returns
The callback receives a plain JavaScript object whose keys match your template schema. No wrapper, no metadata — just the extracted clinical data.
For the schema above, the report looks like:
properties defined in your template schema.
Chat-only mode
If you don’t need report generation, omittemplate and templateid. SofIA will operate as a clinical chat assistant — no generate button appears.
Full standalone example
Here is a complete HTML file you can save and open directly:What’s next
- Required Properties — understand every configuration parameter
- Clinical Data Schemas — design schemas for your specialty
- Framework Guides — integrate with React, Angular, or vanilla JS