Skip to main content
Call createSession(with:onCompletion:) after you initialize the SDK. For Ambient, pass optional session info such as SukiAmbientConstant.kEmrEncounterId for interoperable notes, SukiAmbientConstant.kSessionId (Ambient API encounter_id) for re-ambient workflows, and SukiAmbientConstant.kIsMultilingual when the visit is not English only. Omit sessionType (defaults to .ambient).For Form filling, pass sessionType: .formFilling and optional SukiAmbientConstant.kCorrelationId. Refer to Create Form filling session.Patient demographics for Ambient are not part of createSession. After Ambient create succeeds, pass patient, provider, visit, and related context with setSessionContext(with:).Refer to Create ambient session and Provide clinical context.
None. createSession does not require patient name, birthdate, or gender.After the session is created, you can pass optional patient demographics in setSessionContext under SukiAmbientConstant.kPatientInfo:
  • Birthdate (SukiAmbientConstant.kBirthdate): date of birth.
  • Gender (SukiAmbientConstant.kGender): "MALE" or "FEMALE".
  • Patient id (SukiAmbientConstant.kPatientId): partner or EMR patient identifier. Available from Mobile SDK v2.7.0.
  • Patient name (SukiAmbientConstant.kPatientName): structured name with optional "family", "given", "suffix", and "use". Available from Mobile SDK v2.7.0.
All of these fields are optional. Including them helps personalize note generation. Refer to Patient info.
Yes. Call setSessionContext(with:) after createSession succeeds to add or update patient info, provider context, visit context, EMR info, note sections, diagnosis info, and medication orders. You can call it more than once as data becomes available in your app.Refer to Provide clinical context.
Yes. Pass existing patient diagnoses with SukiAmbientConstant.kDiagnosisInfo in setSessionContext, configure LOINC sections for the note, and retrieve structured diagnoses after the session with getStructuredData(for:). Behavior matches the Ambient APIs for reconciliation and output. Refer to Problem-Based Charting, Create session, and Check status and retrieve content.
Sessions can be in the following states:
  • NotCreated: No session has been initialized.
  • Recording: Session is actively recording audio.
  • Paused: Recording is temporarily paused.
  • Ended: Session completed, content generation in progress.
  • Canceled: Session was canceled, no content will be generated.
Check the current state using SukiAmbientCoreManager.shared.sessionState.
Yes, you can pause and resume sessions:The SDK provides pause and resume methods to temporarily stop and restart recording while keeping the session active.Note that you can only pause an active recording and only resume a paused session.
  • End: Stops recording and begins AI content generation. Use this for completed sessions.
  • Cancel: Stops recording and discards all data. No content will be generated. This action cannot be undone.
End stops recording and begins AI content generation for completed sessions, while Cancel stops recording and discards all data with no content generation.
The current SDK version supports one active session at a time. You must end or cancel the current session before creating a new one. Locally, create can return sessionInProgress. Across devices for the same EMR encounter, create can return remoteSessionConflict(blockingSessionId:). Refer to Ambient interoperability.
Pass SukiAmbientConstant.kEmrEncounterId on createSession to make the note interoperable. For re-ambient workflows, pass SukiAmbientConstant.kSessionId (Ambient API encounter_id) and reuse the same value for every session on that note when you set it on the first create. If the first create omitted encounter_id, pass the returned noteId as the kSessionId value. Store sessionId and noteId when present. Refer to Ambient interoperability and Interoperable identifiers.
Ambient: Yes. sessionId and recordingId are the same value. Use sessionId from the createSession response for recording controls and session-scoped APIs. It maps to Ambient API ambient_session_id.Form filling: No. Treat them as different. SessionResponse.sessionId is the correlation id (passed or generated). SessionResponse.recordingId is what you pass to getFormFillingStructuredData and submitFormFillingFeedback. Refer to Create Form filling session.
Yes, on iOS from Mobile SDK v2.9.0. Pass sessionType: .formFilling on createSession, set forms with setFormFillingContext, end with endFormFillingSession() or end(), and retrieve with getFormFillingStructuredData(for:). You build the form UI. The SDK does not render forms. Ambient and Form filling cannot run at the same time. Refer to Form filling on Mobile SDK.
All session methods can throw SukiAmbientCoreError. Always use do-catch blocks:All session methods can throw SukiAmbientCoreError. Use do-catch blocks to handle errors like session not initialized or attempting to record in the background. Create can also return SukiStatus for FAILED_PRECONDITION and INVALID_ARGUMENT without offline fallback.
iOS doesn’t allow apps to start recording while in the background. The SDK will throw an appIsNotActive error. You should:
  1. Handle this error gracefully.
  2. Notify the user to bring the app to the foreground.
  3. Retry the operation once the app is active.
Use the session delegate to receive real-time updates:Use the session delegate to receive real-time updates about content generation completion and handle events like suggestions generated or generation failures.
Last modified on October 16, 2026