Skip to main content
The following example shows how to build a recording interface with start, pause, resume, and submit controls. The UI updates based on sessionStatus to show the appropriate buttons at each stage. Pass selectedMicrophoneId when you want a specific microphone. Leave it out to use the browser default.
React
Always call setSessionContext to provide patient and encounter details. This context helps the AI understand the clinical scenario and generates significantly higher quality clinical notes.

Available tutorials

Headless Web SDK

Build a Headless Ambient Recorder

Use Headless hooks to sign in, create an ambient session, and control recording in a custom React UI.

20 minIntermediate

Next steps

Learn production pause and submit patterns in Session integration patterns. Call startAmbientSession and resumeAmbientSession with microphone options in Platform client and provider. Learn how to handle errors in the Error handling guide. Refer to Handle ambient session conflicts and Read shared ambient notes for remote conflict handling, remote session end handling, and shared note reads.
Last modified on October 1, 2026