- Authenticate to get an
sdp_suki_token(and register the user if needed). - Create an ambient session and optionally seed context for better notes. An ambient session is one recording for a patient visit (encounter). One encounter can include more than one session.
- Stream audio over the WebSocket, send control events, and end the ambient session when that recording is finished.
- Retrieve the clinical note and transcript, or rely on a webhook when processing finishes.
Access and credentials
You need partner credentials to use the Suki Ambient APIs. Contact our Partnership team to get your credentials. They will guide you through the Onboarding process and provide what you need to get started.Prerequisites
To use the Suki Ambient APIs, you must have the following:- An OAuth-compliant authentication system.
- JWT tokens with consistent user identifiers.
- A publicly accessible endpoint (or Okta authorization server) for token validation.
Environments to use for development and testing
This guide useshttps://sdp.suki-stage.com and wss://sdp.suki-stage.com for API and WebSocket examples (staging).
Important:
- The production environment is
https://sdp.suki.aiandwss://sdp.suki.ai. - The staging environment is
https://sdp.suki-stage.comandwss://sdp.suki-stage.com. - Your partnership team will confirm which environment, base URL, and credentials apply for your integration.
Complete staging script
Replace the credential placeholders, put a 16 kHz mono LINEAR16 WAV (or raw PCM) ataudio.wav, then run. For detailed explanations of each step, refer to the numbered steps below.
- Python:
pip install requests websocket-clientthenpython ambient_staging.py. - TypeScript (Node):
npm install wsthennpx tsx ambient_staging.ts(Node 18+).
Steps
1
Authenticate to get a Suki token
Send a POST request to the Login API endpoint with the following parameters in the request body:Each sample below is self-contained (TypeScript, Python, and cURL). Expect HTTP 200.
- partner_id: Your unique , which we provide to you securely offline.
- partner_token: The user’s OAuth 2.0 ID token () from your identity provider.
- provider_id (Optional for standard partners; required for some auth flows): Unique identifier for the .
suki_token). Include it as the sdp_suki_token header for subsequent API calls.If the user is not registered, call the Register API first, then retry
/login. You only need to register a user once.2
Create an Ambient Session
Send a POST request to Create Ambient Session API. The body can be empty for a first staging session.Optional body fields:
- emr_encounter_id (UUID): EMR or EHR visit ID for cross-modality Ambient interoperability.
- encounter_id: Required for re-ambient workflows. Alphanumeric string up to 255 characters to group sessions for the same note.
- ambient_session_id: Optional UUID v4 to identify the session; Suki generates one if omitted.
ambient_session_id and composition_id.3
Seed Context
POST to Seed Context API after session creation to provide metadata that improves note quality.Include fields such as
provider, patient, visit, sections, diagnoses, and emr.4
Stream Audio via WebSocket (WS)
Open a WebSocket to
wss://sdp.suki-stage.com/ws/stream after session creation and context. Authenticate using Sec-WebSocket-Protocol (SukiAmbientAuth,<sdp_suki_token>,<ambient_session_id>) for browsers or headers for non-browser clients.Audio requirements:- encoding: LINEAR16.
- sample_rate: 16KHz.
- channel: Mono.
AUDIO messages. Required send order: START_TIME, one or more AUDIO messages, then an AUDIO end marker with Base64 of ASCII EOF (RU9G).Supported EVENT values: PAUSE, RESUME, CANCEL, ABORT (deprecated), KEEP_ALIVE. Close the socket when finished, then call the end session endpoint and poll status/content.5
End session
POST to End Session API to end the session.
6
Retrieve Generated Content
Suki notifies your webhook with
session_summary_generated when the note is ready. Alternatively, poll these endpoints:Verify your integration
Before you design the full production workflow, confirm that your staging integration can complete this path:- Authenticate successfully and use the returned
sdp_suki_tokenin follow-up requests. - Create an ambient session and store the returned
ambient_session_id(andcomposition_idwhen you need note-level APIs). - Stream visit audio on
/ws/streamwith the required PCM format and message order. - End the session and confirm that Suki starts processing.
- Retrieve note content (and optionally the transcript), or confirm your webhook receives
session_summary_generated.