Installation Methods
Option 1: NPM/Yarn (Recommended)
This is the recommended option for most projects using modern bundlers like Webpack, Vite, or similar.Installation with NPM
Installation with Yarn
Import in your project
<sofia-sdk> component will be available globally throughout your application.
Option 2: CDN
Ideal for rapid prototyping, bundler-free development, or integration into legacy systems.For specific version
Option 3: Manual build
For projects with custom build pipelines that already have the package installed via npm.Installation Verification
After installation, you can verify that the component is available:In the browser
Open developer tools and run:undefined.
In your HTML
Try adding the basic component:Compatibility
Supported browsers
- Chrome: 80+
- Firefox: 75+
- Safari: 13+
- Edge: 80+
Compatible frameworks
- Vanilla JavaScript: Full compatibility
- React: Native support for Web Components
- Angular: CUSTOM_ELEMENTS_SCHEMA required
- Svelte: Compatible compiler. Svelte works out of the box — no dedicated guide needed. Import the SDK in your component’s
<script>tag and use<sofia-sdk>directly in your template.
SSR Frameworks (Next.js, Nuxt)
Next.js — App Router.client suffix ensures Nuxt only loads it in the browser:
plugins/sofia-sdk.client.ts
Environment Requirements
HTTPS Protocol
SofIA SDK requires HTTPS for audio and microphone functionalities:- Local development:
https://localhostor use tools likelocal-ssl-proxy - Production: Valid SSL certificate mandatory
Content Security Policy (CSP)
If your application uses CSP, add the following directives:Production Security
Recommended: Backend Proxy
Route SDK REST traffic through your own backend so the real API key never reaches the browser. The proxy intercepts requests from the SDK, injects the API key server-side, and forwards them to Omniloy.baseurl at your proxy. The apikey attribute is still required by the SDK — use a placeholder value since the proxy injects the real key:
What about
wssurl? The WebSocket connection (wssurl) is used for real-time audio transcription and is handled separately from REST calls. Contact support@omniloy.com if you need to proxy WebSocket traffic as well — the Omniloy team can advise on the best approach for your infrastructure.IP Allowlisting
As an additional layer of protection, Omniloy can restrict API key usage to specific IP addresses. This is especially useful with a backend proxy, where all traffic originates from your server’s fixed IP. Contact support@omniloy.com to configure IP allowlisting for your production keys.Common Troubleshooting
Component doesn’t load
- Verify the import is in the main file
- Confirm there are no errors in the browser console
- Check network connectivity if using CDN
CORS errors
- Ensure your application is served from HTTPS
- Verify that
baseurlandwssurlURLs are correct
Component not defined
Next Steps
Once installation is complete:- Required properties: Configure mandatory parameters
- Optional properties: Customize behavior
- Clinical data schemas: Define data structure to generate