Skip to main content
This guide walks you through setting up the Suki Headless Web SDK in your React application, from installation to creating your first ambient recording session. What you will do
  1. Install @suki-sdk/platform-react in your React project.
  2. Wrap your app with PlatformClient and PlatformClientProvider at the root so all SDK hooks share one client.
  3. Authenticate with useAuth inside that tree so users are signed in and tokens are available.
  4. Create an ambient session with useAmbient, then control recording with useAmbientSession (start, pause, resume, submit, and optional context).
  5. Wire up a minimal end-to-end flow using the complete example as a reference.
Using an AI coding tool?Copy the following prompt to add the Suki developer documentation as a skill and MCP server to your tool for better AI-assisted coding during the integration process. For all AI options (contextual menu, llms.txt, and skill.md), refer to AI-optimized documentation.

Install the Suki developer docs as a skill to get context on Suki's developer tools, APIs, and SDKs. Add the MCP server for documentation search.

Open in Cursor

Prerequisites

For the rest of this documentation, we assume the following setup is complete:
  • You have received your partnerId from Suki.
  • Your host URLs are on the Suki allowlist.
  • Your partner configuration in the Suki Platform points to your correct JWKS endpoint.
  • Your JWT token contains the key that you specified as your User identifier field.
Refer to the Prerequisites guide for more information.

Install the package

To begin, install the Suki Headless Web SDK package in your React project:
For detailed setup instructions, refer to the Installation guide.

Required configuration

Create a single PlatformClient instance and wrap your entire application with PlatformClientProvider. Hooks such as useAuth, useAmbient, and useAmbientSession must run under this provider.
React

Authenticate with useAuth

After the provider wraps your app, use useAuth in a child component (for example YourApp). This hook manages user identity and provides access tokens needed for all SDK operations.
React
If you set autoRegister: true, you must provide providerName, providerOrgId, and providerSpecialty. If you prefer manual registration, set autoRegister: false and use the registerUser method. See the Authentication hook guide for more details.

Create ambient session

Once authenticated, create an ambient session using the useAmbient hook. This creates a session container that you’ll use for recording.
React
You must wait for isSuccess to be true before attempting to use the ambientSessionId. Passing an undefined ID to the recording hooks will cause errors.

Manage recording

Use the useAmbientSession hook to control recording. This hook provides methods to start, pause, resume, and submit recordings, along with session status.
React
Always use setSessionContext to provide relevant patient or encounter details. This context acts as a hint for the AI, resulting in significantly higher quality clinical notes.

Complete example

Here’s a complete example that brings everything together:
React

Next steps

Refer to the following guides to learn more: Platform client and provider - Understand how to use PlatformClient and PlatformClientProvider Authentication hook - Learn more about authentication options and token management Create ambient session - Understand session creation in detail Manage ambient session - Explore all recording controls and session context Error handling - Learn how to handle errors gracefully Offline mode - Understand how the SDK handles network interruptions
Last modified on June 12, 2026