Skip to main content
Problem: You close the WebSocket, but the ambient session never completes and no note is generated. Solution: Send a final AUDIO frame with "data": "RU9G" (Base64 of ASCII EOF), close the socket, then POST /api/v1/ambient/session/{ambient_session_id}/end. Closing the socket alone is not enough.
This cookbook assumes you already have your Partner ID, authentication tokens, and an active ambient session with a WebSocket stream open.

Common mistakes

  • Close the WebSocket without sending RU9G.
  • Send Dictation-style AUDIO_END on the ambient /ws/stream endpoint.
  • Treat WebSocket close alone as session complete. You still need REST end, then status polling.

Other cookbooks

AmbientAPI

Poll Session Status Before Fetching Content

Poll until status is completed.

5 min
AmbientAPI

Authenticate Browser WebSocket Handshake

Auth browser WebSocket with protocols.

5 min
Last modified on July 23, 2026