Skip to main content
The SofIA SDK requires just three properties to connect: apikey, userid, and patientid. The component validates their presence and type before establishing the connection. baseurl is only required for some keys — see Connection and authentication below.

Quick Reference

All SofIA SDK properties in a single table. For detailed documentation, see Connection and authentication and Optional Properties.
For migration guidance on deprecated properties, see the Migration Guide.

Connection and authentication

The apikey is the only connection property you always need. For newer keys, the SDK selects the endpoint automatically — so you do not pass baseurl.
Does my key need baseurl? Newer keys don’t — the SDK resolves the endpoint for you, so you can omit baseurl. Other keys do — keep passing the baseurl value Omniloy assigned you. If you’re unsure, Omniloy will tell you which applies to your key.
wssurl is deprecated and ignored since v1.0.7. The transcription WebSocket URL is now provided automatically by the settings API. Passing wssurl has no effect; you can safely remove it from your integration.

Session Identifiers

Use internal surrogate identifiers for userid and patientid — never a medical record number (MRN) or other direct patient/professional identifier. Unlike patientdata, these values are sent without anonymization.
  • Use persistent, unique identifiers
  • Avoid personally identifiable information
  • Maintain consistency across sessions
  • Consider using professional license numbers or internal IDs
  • Must be unique within your system
  • Should not contain direct personal identifiers
  • Can be changed dynamically for different consultations
  • Must comply with data protection regulations
Changing patientid triggers a full session reset. When you update patientid dynamically, the SDK clears the chat history, closes the current WebSocket connection, and starts a completely new session. The previous conversation context is not carried over to the new patient. Always ensure any pending report generation has completed before switching patients.

Report Generation

These properties enable report generation. When both template and templateid are provided, the generate button becomes available in the interface. Without them, SofIA operates in chat-only mode automatically.
Deprecated: The toolsargs property has been renamed to template. Use template instead. toolsargs will be removed in v2.0.

template (Optional — required for report generation)

JSON Schema defining the structure for clinical data capture. When provided together with templateid, enables the report generation feature and shows the generate button in the interface.
Schema requirements:
  • Must be valid JSON Schema Draft-07
  • Must include $schema property
  • Should define required fields appropriately
  • Must not exceed 100KB in size
Example for general consultation:
For complex schemas, set the template programmatically via JavaScript instead of inline HTML to avoid JSON escaping issues. See Templates — Passing templates.

templateid (Optional — required for report generation)

Integrator-defined identifier that you assign to each template. Must be provided together with template to enable report generation.
How it works:
  • You choose the templateid value — it is not provided by Omniloy
  • Each unique template must have its own templateid
  • SofIA uses this ID to associate configurations and report history on the server
  • If you reuse the same templateid with a different template schema, the previous configuration will be overwritten
Using the same templateid for different template schemas will overwrite the previous configuration. Always assign a distinct templateid to each template you use.
Naming examples:
  • "soap-general-v1" — SOAP notes for general practice
  • "emergency-triage-v2" — emergency department triage
  • "cardiology-consult-v1" — cardiology consultations
  • "my-clinic-intake-form" — custom intake form for your clinic

Automatic Validation

The SofIA SDK component performs automatic validation of the required configuration properties:
  • Type verification: Confirms that each property has the correct type
  • URL validation: Verifies that the resolved baseurl uses the secure HTTPS protocol

Validation Error Messages

When validation fails, the SofIA SDK will display detailed error messages in the browser console and prevent the component from mounting. This ensures that integration issues are identified early in the development process. Example validation error output:
Error message components:
  • Property name: Identifies which property failed validation
  • Description: Explains the purpose of each property
  • Current value: Shows the invalid value that was provided (when applicable)
  • Documentation link: Provides direct access to this reference guide
Component behavior during validation errors:
  • The SofIA SDK component will not establish connections
  • No medical data processing will occur
  • The component remains in a safe, non-functional state
  • Error messages are logged to help developers identify and resolve issues quickly
For comprehensive troubleshooting of validation errors, see our troubleshooting guide.

Minimal example (chat-only mode)

With a newer key, apikey, userid, and patientid are all you need:
Does your key require a baseurl? Add the one Omniloy assigned you:
If any required property is missing or invalid, the component will show an error and will not connect to SofIA services.

With report generation

To enable report generation, add both template and templateid:

Complete Configuration Example

Dynamic Configuration

Updating properties programmatically

Framework-specific configuration

React
Angular

Validation

Property validation checklist

  • apikey is valid and not expired
  • baseurl uses HTTPS protocol (only needed for keys that require it)
  • userid is unique and consistent
  • patientid is unique for the consultation
  • templateid is unique per template and consistent across sessions (if using report generation)
  • template is valid JSON Schema Draft-07 (if using report generation)
  • All required properties are present
  • No properties exceed size limits

Next Steps

After configuring required properties:
  1. Configure optional properties
  2. Design clinical data schemas
  3. Implement in your framework