Skip to main content
Quick summary
Call createSession(with:onCompletion:) to create an ambient session. For a shared note across Suki products, pass SukiAmbientConstant.kEmrEncounterId. On success, store sessionId and, when present, compositionId.
If you want ambient interoperability across Ambient APIs, Mobile SDK, Headless Web SDK, and Web SDK, you must pass SukiAmbientConstant.kEmrEncounterId on createSession. Without it, the session is created, but the clinical note is not shared across products. For the full workflow, refer to Ambient interoperability and Use ambient across modalities.
Before you can record audio and generate clinical notes, you must create an ambient session. This guide explains how to create a session, pass the identifiers required for ambient interoperability, and store the response fields needed for recording and later note retrieval. What will you learn? In this guide, you will learn how to:
  • Create an ambient session using createSession(with:onCompletion:)
  • Pass kEmrEncounterId and kSessionId (Session Group ID) for interoperable notes
  • Store sessionId and compositionId from the success response
  • Handle create errors that do not fall back to offline

Create an Ambient session

To start capturing audio and generating notes, you must first create a session. The session holds the audio and context for a single patient encounter. Call createSession(with:onCompletion:). When successful, store the returned identifiers for recording and later retrieval.
Swift

Session info parameters

The withSessionInfo dictionary accepts these parameters:
string
Your EMR or EHR encounter UUID for the patient visit. String key: "emrEncounterId". Maps to Ambient API emr_encounter_id. Pass this value to make the session interoperable across Ambient APIs, Mobile SDK, and Web SDK.
string
The Session Group ID for the clinical note. String key: "sessionId". Maps to Ambient API encounter_id.Pass this value when you create or re-ambient a session so related ambient sessions contribute to the same note. Do not confuse it with the create response sessionId, which identifies the current ambient session, or with compositionId, which identifies the note.
boolean
default:"false"
Enables multilingual processing for the session. Set this to true if the conversation will be in languages other than English. The default value is false (English only). Once set, this cannot be changed for the session.

Create session success response

A successful createSession call returns the following identifiers. Store these values if you need to continue the session, access the recording, or retrieve the generated clinical note later. On Ambient APIs, the equivalent create response fields are ambient_session_id and composition_id.
  • Always store sessionId for recording and session content. It maps to Ambient API ambient_session_id.
  • Store compositionId when present for note-level reads. It maps to Ambient API composition_id.
  • Store the Session Group ID you pass as kSessionId. The create response sessionId is not the Session Group ID. compositionId is the note id. It is not the Session Group ID.

Create session errors

Some createSession failures do not fall back to an offline session. Handle these errors before retrying createSession. Other createSession failures can still follow the existing offline workflow. For more information, see Offline mode and Error messages.

Next steps

Refer to Ambient interoperability for conflict handling, peer terminate, and shared note reads. Refer to Provide clinical context to enrich the session for better note quality. After you create a session, proceed to Recording controls to start recording.
Last modified on July 24, 2026