Use this endpoint to create an ambient session. Suki will generate a ambient_session_id and return it in the response.
You can use this ambient_session_id to identify the session in subsequent API calls. We recommend that an ambient session should be atleast 1 minute long.
In case of a short session, the note generation will be skipped.
Code Examples
import requests
url = "https://sdp.suki.ai/api/v1/ambient/session/create"
headers = {
"sdp_suki_token": "<sdp_suki_token>",
"Content-Type": "application/json"
}
payload = {
"ambient_session_id": "123dfg-456dfg-789dfg-012dfg", # Optional, UUID format
"encounter_id": "123dfg-456dfg-789dfg-012dfg", # Optional, UUID format
"multilingual": False # Optional, defaults to false
}
response = requests.post(url, json=payload, headers=headers)
if response.status_code == 201:
data = response.json()
ambient_session_id = data["ambient_session_id"]
print(f"Session created successfully. Session ID: {ambient_session_id}")
else:
print(f"Failed to create session: {response.status_code}")
print(response.json())