Ambient Content Retrieval
Get Note Context
Retrieve Ambient note context aggregated across Ambient sessions
GET
/
api
/
v1
/
ambient
/
note
/
{note_id}
/
context
Gets the ambient context for a note.
curl --request GET \
--url https://sdp.suki.ai/api/v1/ambient/note/{note_id}/context \
--header 'sdp_suki_token: <api-key>'import requests
url = "https://sdp.suki.ai/api/v1/ambient/note/{note_id}/context"
headers = {"sdp_suki_token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {sdp_suki_token: '<api-key>'}};
fetch('https://sdp.suki.ai/api/v1/ambient/note/{note_id}/context', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sdp.suki.ai/api/v1/ambient/note/{note_id}/context",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"sdp_suki_token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sdp.suki.ai/api/v1/ambient/note/{note_id}/context"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("sdp_suki_token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sdp.suki.ai/api/v1/ambient/note/{note_id}/context")
.header("sdp_suki_token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sdp.suki.ai/api/v1/ambient/note/{note_id}/context")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["sdp_suki_token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"context": {
"chief_complaint": "Headache",
"encounter_type": "AMBULATORY",
"provider_role": "ATTENDING",
"reason_for_visit": "Follow-up for migraines",
"visit_type": "ESTABLISHED_PATIENT"
}
}{
"code": 400,
"message": "invalid request"
}{
"code": 401,
"message": "invalid token"
}{
"code": 404,
"message": "not found"
}{
"code": 500,
"message": "internal server error"
}Use this endpoint to get ambient note context aggregated across ambient sessions.
The response
context object can include fileds related to the visit context aggregated across sessions in the note.
To know the supported visit type, encounter type, and provider role values, refer to the ambient Info endpoint.
Use composition_id from Create ambient session as note_id.
Code examples
- Python
- TypeScript
import json
import requests
BASE_URL = "https://sdp.suki.ai"
# Use composition_id from Create Ambient Session as note_id
note_id = "<composition_id>"
# Get sdp_suki_token from Login: POST /api/v1/auth/login
sdp_suki_token = "<sdp_suki_token>"
# Required for single_auth partners
sdp_provider_id = "<sdp_provider_id>"
url = f"{BASE_URL}/api/v1/ambient/note/{note_id}/context"
headers = {
"sdp_suki_token": sdp_suki_token,
"sdp_provider_id": sdp_provider_id,
}
response = requests.get(url, headers=headers, timeout=60)
print("HTTP status:", response.status_code)
try:
response_body = response.json()
except ValueError:
print("Response was not JSON:")
print(response.text)
raise SystemExit(1)
print("Response body:")
print(json.dumps(response_body, indent=2))
if response.status_code == 200:
context = response_body.get("context") or {}
print("visit_type:", context.get("visit_type"))
print("encounter_type:", context.get("encounter_type"))
print("provider_role:", context.get("provider_role"))
print("reason_for_visit:", context.get("reason_for_visit"))
print("chief_complaint:", context.get("chief_complaint"))
else:
print("Get Note Context failed.")
if isinstance(response_body, dict):
print("code:", response_body.get("code"))
print("message:", response_body.get("message"))
const BASE_URL = "https://sdp.suki.ai";
// Use composition_id from Create Ambient Session as note_id
const noteId = "<composition_id>";
// Get sdp_suki_token from Login: POST /api/v1/auth/login
const sdpSukiToken = "<sdp_suki_token>";
// Required for single_auth partners
const sdpProviderId = "<sdp_provider_id>";
type NoteContext = {
visit_type?: string;
encounter_type?: string;
provider_role?: string;
reason_for_visit?: string;
chief_complaint?: string;
};
type GetNoteContextResponse = {
context?: NoteContext;
};
type ApiErrorResponse = {
code?: number;
message?: string;
};
const response = await fetch(
`${BASE_URL}/api/v1/ambient/note/${noteId}/context`,
{
method: "GET",
headers: {
sdp_suki_token: sdpSukiToken,
sdp_provider_id: sdpProviderId,
},
}
);
const responseText = await response.text();
let responseBody: GetNoteContextResponse | ApiErrorResponse | unknown;
try {
responseBody = responseText ? JSON.parse(responseText) : {};
} catch {
console.error("Response was not JSON:");
console.error(responseText);
throw new Error("Get Note Context returned non-JSON response");
}
console.log("HTTP status:", response.status);
console.log("Response body:", JSON.stringify(responseBody, null, 2));
if (response.status === 200) {
const payload = responseBody as GetNoteContextResponse;
const context = payload.context || {};
console.log("visit_type:", context.visit_type);
console.log("encounter_type:", context.encounter_type);
console.log("provider_role:", context.provider_role);
console.log("reason_for_visit:", context.reason_for_visit);
console.log("chief_complaint:", context.chief_complaint);
} else {
const error = responseBody as ApiErrorResponse;
console.error("Get Note Context failed.");
console.error("code:", error.code);
console.error("message:", error.message);
}
Authorizations
Suki access token (suki_token) from Login or Register. Expires after one hour.
Headers
Optional for standard partners.
Required for:
- Bearer authentication. Use the same
provider_idreturned by the Login or Register API. - Single Auth Token authentication. Include the same
provider_idon every request assdp_provider_id.
Example:
"provider-123"
Path Parameters
Note identifier. Use the composition_id returned from Ambient session create.
Response
Success Response
Visit context aggregated across sessions in the note.
Note-level ambient context.
Show child attributes
Show child attributes
Last modified on July 23, 2026
Was this page helpful?
⌘I
Gets the ambient context for a note.
curl --request GET \
--url https://sdp.suki.ai/api/v1/ambient/note/{note_id}/context \
--header 'sdp_suki_token: <api-key>'import requests
url = "https://sdp.suki.ai/api/v1/ambient/note/{note_id}/context"
headers = {"sdp_suki_token": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {sdp_suki_token: '<api-key>'}};
fetch('https://sdp.suki.ai/api/v1/ambient/note/{note_id}/context', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://sdp.suki.ai/api/v1/ambient/note/{note_id}/context",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"sdp_suki_token: <api-key>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sdp.suki.ai/api/v1/ambient/note/{note_id}/context"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("sdp_suki_token", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://sdp.suki.ai/api/v1/ambient/note/{note_id}/context")
.header("sdp_suki_token", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://sdp.suki.ai/api/v1/ambient/note/{note_id}/context")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["sdp_suki_token"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"context": {
"chief_complaint": "Headache",
"encounter_type": "AMBULATORY",
"provider_role": "ATTENDING",
"reason_for_visit": "Follow-up for migraines",
"visit_type": "ESTABLISHED_PATIENT"
}
}{
"code": 400,
"message": "invalid request"
}{
"code": 401,
"message": "invalid token"
}{
"code": 404,
"message": "not found"
}{
"code": 500,
"message": "internal server error"
}