Skip to main content
This quickstart walks you through one successful Ambient API session on staging: authenticate, create a session, stream visit audio, end the session, and retrieve the clinical note. Rely on a webhook when processing finishes to handle notifications. Your application owns session controls, audio streaming, status handling, note review, and EHR handoff. For product context and when to choose Ambient APIs versus ambient SDKs, refer to Ambient clinical documentation. What you will do
  1. Authenticate to get an sdp_suki_token (and register the user if needed).
  2. 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.
  3. Stream audio over the WebSocket, send control events, and end the ambient session when that recording is finished.
  4. Retrieve the clinical note and transcript, or rely on a webhook when processing finishes.
Prefer one paste-ready file? Use the Complete staging script in the preferred language below, then follow the numbered steps for the same flow with full explanations.
Using an AI coding tool?Copy the prompt below to point your agent at the Ambient skill and Documentation MCP. For every task skill, refer to AI coding tools.

Fetch the Ambient skill and connect the documentation MCP.

Open in Cursor

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 uses https://sdp.suki-stage.com and wss://sdp.suki-stage.com for API and WebSocket examples (staging).
Important:
  • The production environment is https://sdp.suki.ai and wss://sdp.suki.ai.
  • The staging environment is https://sdp.suki-stage.com and wss://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) at audio.wav, then run. For detailed explanations of each step, refer to the numbered steps below.
  • Python: pip install requests websocket-client then python ambient_staging.py.
  • TypeScript (Node): npm install ws then npx tsx ambient_staging.ts (Node 18+).
Ambient sessions must be at least 1 minute of audio for note generation. Shorter sessions can return status skipped with no note. Use a WAV or raw LINEAR16 PCM file that is long enough when you test.

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:
  • 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 .
On success the API returns a (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.
Each sample below is self-contained (TypeScript, Python, and cURL). Expect HTTP 200.
Save the suki_token as it is valid for 1 hour. Request a new token before it expires.
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.
Expect HTTP 201 and a response with ambient_session_id and composition_id.
Save ambient_session_id and composition_id. Use the session ID for streaming and content calls; use composition_id as note_id for note-level APIs.
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.
Strip WAV headers (44 bytes) before chunking. Send 100ms PCM chunks Base64-encoded in 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.
Use the Complete staging script for a full streaming client. When capture finishes, close the WebSocket, then call end session.
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_token in follow-up requests.
  • Create an ambient session and store the returned ambient_session_id (and composition_id when you need note-level APIs).
  • Stream visit audio on /ws/stream with 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.
After this path works end to end on staging, continue with context quality, interoperability fields, and production rollout.

Next steps

After you complete your first Ambient API session: Authentication API - Login, register, and JWKS configuration. Context API - Seed specialty, sections, and patient info for better note accuracy. Audio streaming API - WebSocket connection details and message formats. Webhook - Configure webhooks to receive notifications when notes are ready.
Last modified on August 7, 2026