Seed Ambient Session Context
Provide clinical context and patient information for ambient session
curl --request POST \
--url https://sdp.suki.ai/api/v1/ambient/session/<ambient_session_id>/context \
--header 'Content-Type: application/json' \
--header 'sdp_suki_token: <sdp_suki_token>' \
--header 'sdp_provider_id: <sdp_provider_id>' \
--data '{
"diagnoses": {
"values": [
{
"codes": [
{
"code": "30422",
"description": "Essential hypertension",
"type": "IMO"
}
],
"diagnosis_note": "Hypertension"
}
]
},
"emr": {
"target_emr": "ATHENA"
},
"orders": {
"medication_orders": {
"values": [
{
"dosage": {
"quantity": 1,
"raw_value": "1 tablet",
"unit": "TAB"
},
"drug_name": "Acetaminophen 500mg Tab",
"duration_in_days": 7,
"end_date": "2026-01-08T00:00:00Z",
"format": {
"raw_value": "Tablet"
},
"frequency": {
"raw_value": "once daily",
"structured_value": "ONE_A_DAY"
},
"instructions": "Take with food",
"linked_diagnosis_codes": [
{
"code": "I10",
"type": "ICD10"
}
],
"medication_code": {
"code": "860975",
"type": "RXCUI"
},
"medication_timing": {
"raw_value": "morning",
"structured_value": "IN_THE_MORNING"
},
"metadata": {
"encounter_relation": "CURRENT_ENCOUNTER",
"origin": "SUKI_AMBIENT"
},
"number_of_refills": 3,
"quantity_dispensed": "1 box",
"route": {
"raw_value": "Oral"
},
"start_date": "2026-01-01T00:00:00Z",
"status": "ACTIVE",
"strength": {
"raw_value": "500mg"
}
}
]
}
},
"patient": {
"dob": "2000-01-01",
"sex": "male"
},
"provider": {
"role": "ATTENDING",
"specialty": "CARDIOLOGY"
},
"sections": [
{
"loinc": "10164-2"
}
],
"visit": {
"chief_complaint": "Headache",
"encounter_type": "AMBULATORY",
"reason_for_visit": "Follow-up for migraines",
"visit_type": "ESTABLISHED_PATIENT"
}
}'import requests
url = "https://sdp.suki.ai/api/v1/ambient/session/{ambient_session_id}/context"
payload = {
"diagnoses": { "values": [
{
"codes": [
{
"code": "30422",
"description": "Essential hypertension",
"type": "IMO"
}
],
"diagnosis_note": "Hypertension"
}
] },
"emr": { "target_emr": "ATHENA" },
"orders": { "medication_orders": { "values": [
{
"dosage": {
"quantity": 1,
"raw_value": "1 tablet",
"unit": "TAB"
},
"drug_name": "Acetaminophen 500mg Tab",
"duration_in_days": 7,
"end_date": "2026-01-08T00:00:00Z",
"format": { "raw_value": "Tablet" },
"frequency": {
"raw_value": "once daily",
"structured_value": "ONE_A_DAY"
},
"instructions": "Take with food",
"linked_diagnosis_codes": [
{
"code": "I10",
"type": "ICD10"
}
],
"medication_code": {
"code": "860975",
"type": "RXCUI"
},
"medication_timing": {
"raw_value": "morning",
"structured_value": "IN_THE_MORNING"
},
"metadata": {
"encounter_relation": "CURRENT_ENCOUNTER",
"origin": "SUKI_AMBIENT"
},
"number_of_refills": 3,
"quantity_dispensed": "1 box",
"route": { "raw_value": "Oral" },
"start_date": "2026-01-01T00:00:00Z",
"status": "ACTIVE",
"strength": { "raw_value": "500mg" }
}
] } },
"patient": {
"dob": "2000-01-01",
"sex": "male"
},
"provider": {
"role": "ATTENDING",
"specialty": "CARDIOLOGY"
},
"sections": [{ "loinc": "10164-2" }],
"visit": {
"chief_complaint": "Headache",
"encounter_type": "AMBULATORY",
"reason_for_visit": "Follow-up for migraines",
"visit_type": "ESTABLISHED_PATIENT"
}
}
headers = {
"sdp_suki_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {sdp_suki_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
diagnoses: {
values: [
{
codes: [{code: '30422', description: 'Essential hypertension', type: 'IMO'}],
diagnosis_note: 'Hypertension'
}
]
},
emr: {target_emr: 'ATHENA'},
orders: {
medication_orders: {
values: [
{
dosage: {quantity: 1, raw_value: '1 tablet', unit: 'TAB'},
drug_name: 'Acetaminophen 500mg Tab',
duration_in_days: 7,
end_date: '2026-01-08T00:00:00Z',
format: {raw_value: 'Tablet'},
frequency: {raw_value: 'once daily', structured_value: 'ONE_A_DAY'},
instructions: 'Take with food',
linked_diagnosis_codes: [{code: 'I10', type: 'ICD10'}],
medication_code: {code: '860975', type: 'RXCUI'},
medication_timing: {raw_value: 'morning', structured_value: 'IN_THE_MORNING'},
metadata: {encounter_relation: 'CURRENT_ENCOUNTER', origin: 'SUKI_AMBIENT'},
number_of_refills: 3,
quantity_dispensed: '1 box',
route: {raw_value: 'Oral'},
start_date: '2026-01-01T00:00:00Z',
status: 'ACTIVE',
strength: {raw_value: '500mg'}
}
]
}
},
patient: {dob: '2000-01-01', sex: 'male'},
provider: {role: 'ATTENDING', specialty: 'CARDIOLOGY'},
sections: [{loinc: '10164-2'}],
visit: {
chief_complaint: 'Headache',
encounter_type: 'AMBULATORY',
reason_for_visit: 'Follow-up for migraines',
visit_type: 'ESTABLISHED_PATIENT'
}
})
};
fetch('https://sdp.suki.ai/api/v1/ambient/session/{ambient_session_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/session/{ambient_session_id}/context",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'diagnoses' => [
'values' => [
[
'codes' => [
[
'code' => '30422',
'description' => 'Essential hypertension',
'type' => 'IMO'
]
],
'diagnosis_note' => 'Hypertension'
]
]
],
'emr' => [
'target_emr' => 'ATHENA'
],
'orders' => [
'medication_orders' => [
'values' => [
[
'dosage' => [
'quantity' => 1,
'raw_value' => '1 tablet',
'unit' => 'TAB'
],
'drug_name' => 'Acetaminophen 500mg Tab',
'duration_in_days' => 7,
'end_date' => '2026-01-08T00:00:00Z',
'format' => [
'raw_value' => 'Tablet'
],
'frequency' => [
'raw_value' => 'once daily',
'structured_value' => 'ONE_A_DAY'
],
'instructions' => 'Take with food',
'linked_diagnosis_codes' => [
[
'code' => 'I10',
'type' => 'ICD10'
]
],
'medication_code' => [
'code' => '860975',
'type' => 'RXCUI'
],
'medication_timing' => [
'raw_value' => 'morning',
'structured_value' => 'IN_THE_MORNING'
],
'metadata' => [
'encounter_relation' => 'CURRENT_ENCOUNTER',
'origin' => 'SUKI_AMBIENT'
],
'number_of_refills' => 3,
'quantity_dispensed' => '1 box',
'route' => [
'raw_value' => 'Oral'
],
'start_date' => '2026-01-01T00:00:00Z',
'status' => 'ACTIVE',
'strength' => [
'raw_value' => '500mg'
]
]
]
]
],
'patient' => [
'dob' => '2000-01-01',
'sex' => 'male'
],
'provider' => [
'role' => 'ATTENDING',
'specialty' => 'CARDIOLOGY'
],
'sections' => [
[
'loinc' => '10164-2'
]
],
'visit' => [
'chief_complaint' => 'Headache',
'encounter_type' => 'AMBULATORY',
'reason_for_visit' => 'Follow-up for migraines',
'visit_type' => 'ESTABLISHED_PATIENT'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sdp.suki.ai/api/v1/ambient/session/{ambient_session_id}/context"
payload := strings.NewReader("{\n \"diagnoses\": {\n \"values\": [\n {\n \"codes\": [\n {\n \"code\": \"30422\",\n \"description\": \"Essential hypertension\",\n \"type\": \"IMO\"\n }\n ],\n \"diagnosis_note\": \"Hypertension\"\n }\n ]\n },\n \"emr\": {\n \"target_emr\": \"ATHENA\"\n },\n \"orders\": {\n \"medication_orders\": {\n \"values\": [\n {\n \"dosage\": {\n \"quantity\": 1,\n \"raw_value\": \"1 tablet\",\n \"unit\": \"TAB\"\n },\n \"drug_name\": \"Acetaminophen 500mg Tab\",\n \"duration_in_days\": 7,\n \"end_date\": \"2026-01-08T00:00:00Z\",\n \"format\": {\n \"raw_value\": \"Tablet\"\n },\n \"frequency\": {\n \"raw_value\": \"once daily\",\n \"structured_value\": \"ONE_A_DAY\"\n },\n \"instructions\": \"Take with food\",\n \"linked_diagnosis_codes\": [\n {\n \"code\": \"I10\",\n \"type\": \"ICD10\"\n }\n ],\n \"medication_code\": {\n \"code\": \"860975\",\n \"type\": \"RXCUI\"\n },\n \"medication_timing\": {\n \"raw_value\": \"morning\",\n \"structured_value\": \"IN_THE_MORNING\"\n },\n \"metadata\": {\n \"encounter_relation\": \"CURRENT_ENCOUNTER\",\n \"origin\": \"SUKI_AMBIENT\"\n },\n \"number_of_refills\": 3,\n \"quantity_dispensed\": \"1 box\",\n \"route\": {\n \"raw_value\": \"Oral\"\n },\n \"start_date\": \"2026-01-01T00:00:00Z\",\n \"status\": \"ACTIVE\",\n \"strength\": {\n \"raw_value\": \"500mg\"\n }\n }\n ]\n }\n },\n \"patient\": {\n \"dob\": \"2000-01-01\",\n \"sex\": \"male\"\n },\n \"provider\": {\n \"role\": \"ATTENDING\",\n \"specialty\": \"CARDIOLOGY\"\n },\n \"sections\": [\n {\n \"loinc\": \"10164-2\"\n }\n ],\n \"visit\": {\n \"chief_complaint\": \"Headache\",\n \"encounter_type\": \"AMBULATORY\",\n \"reason_for_visit\": \"Follow-up for migraines\",\n \"visit_type\": \"ESTABLISHED_PATIENT\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("sdp_suki_token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sdp.suki.ai/api/v1/ambient/session/{ambient_session_id}/context")
.header("sdp_suki_token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"diagnoses\": {\n \"values\": [\n {\n \"codes\": [\n {\n \"code\": \"30422\",\n \"description\": \"Essential hypertension\",\n \"type\": \"IMO\"\n }\n ],\n \"diagnosis_note\": \"Hypertension\"\n }\n ]\n },\n \"emr\": {\n \"target_emr\": \"ATHENA\"\n },\n \"orders\": {\n \"medication_orders\": {\n \"values\": [\n {\n \"dosage\": {\n \"quantity\": 1,\n \"raw_value\": \"1 tablet\",\n \"unit\": \"TAB\"\n },\n \"drug_name\": \"Acetaminophen 500mg Tab\",\n \"duration_in_days\": 7,\n \"end_date\": \"2026-01-08T00:00:00Z\",\n \"format\": {\n \"raw_value\": \"Tablet\"\n },\n \"frequency\": {\n \"raw_value\": \"once daily\",\n \"structured_value\": \"ONE_A_DAY\"\n },\n \"instructions\": \"Take with food\",\n \"linked_diagnosis_codes\": [\n {\n \"code\": \"I10\",\n \"type\": \"ICD10\"\n }\n ],\n \"medication_code\": {\n \"code\": \"860975\",\n \"type\": \"RXCUI\"\n },\n \"medication_timing\": {\n \"raw_value\": \"morning\",\n \"structured_value\": \"IN_THE_MORNING\"\n },\n \"metadata\": {\n \"encounter_relation\": \"CURRENT_ENCOUNTER\",\n \"origin\": \"SUKI_AMBIENT\"\n },\n \"number_of_refills\": 3,\n \"quantity_dispensed\": \"1 box\",\n \"route\": {\n \"raw_value\": \"Oral\"\n },\n \"start_date\": \"2026-01-01T00:00:00Z\",\n \"status\": \"ACTIVE\",\n \"strength\": {\n \"raw_value\": \"500mg\"\n }\n }\n ]\n }\n },\n \"patient\": {\n \"dob\": \"2000-01-01\",\n \"sex\": \"male\"\n },\n \"provider\": {\n \"role\": \"ATTENDING\",\n \"specialty\": \"CARDIOLOGY\"\n },\n \"sections\": [\n {\n \"loinc\": \"10164-2\"\n }\n ],\n \"visit\": {\n \"chief_complaint\": \"Headache\",\n \"encounter_type\": \"AMBULATORY\",\n \"reason_for_visit\": \"Follow-up for migraines\",\n \"visit_type\": \"ESTABLISHED_PATIENT\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sdp.suki.ai/api/v1/ambient/session/{ambient_session_id}/context")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["sdp_suki_token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"diagnoses\": {\n \"values\": [\n {\n \"codes\": [\n {\n \"code\": \"30422\",\n \"description\": \"Essential hypertension\",\n \"type\": \"IMO\"\n }\n ],\n \"diagnosis_note\": \"Hypertension\"\n }\n ]\n },\n \"emr\": {\n \"target_emr\": \"ATHENA\"\n },\n \"orders\": {\n \"medication_orders\": {\n \"values\": [\n {\n \"dosage\": {\n \"quantity\": 1,\n \"raw_value\": \"1 tablet\",\n \"unit\": \"TAB\"\n },\n \"drug_name\": \"Acetaminophen 500mg Tab\",\n \"duration_in_days\": 7,\n \"end_date\": \"2026-01-08T00:00:00Z\",\n \"format\": {\n \"raw_value\": \"Tablet\"\n },\n \"frequency\": {\n \"raw_value\": \"once daily\",\n \"structured_value\": \"ONE_A_DAY\"\n },\n \"instructions\": \"Take with food\",\n \"linked_diagnosis_codes\": [\n {\n \"code\": \"I10\",\n \"type\": \"ICD10\"\n }\n ],\n \"medication_code\": {\n \"code\": \"860975\",\n \"type\": \"RXCUI\"\n },\n \"medication_timing\": {\n \"raw_value\": \"morning\",\n \"structured_value\": \"IN_THE_MORNING\"\n },\n \"metadata\": {\n \"encounter_relation\": \"CURRENT_ENCOUNTER\",\n \"origin\": \"SUKI_AMBIENT\"\n },\n \"number_of_refills\": 3,\n \"quantity_dispensed\": \"1 box\",\n \"route\": {\n \"raw_value\": \"Oral\"\n },\n \"start_date\": \"2026-01-01T00:00:00Z\",\n \"status\": \"ACTIVE\",\n \"strength\": {\n \"raw_value\": \"500mg\"\n }\n }\n ]\n }\n },\n \"patient\": {\n \"dob\": \"2000-01-01\",\n \"sex\": \"male\"\n },\n \"provider\": {\n \"role\": \"ATTENDING\",\n \"specialty\": \"CARDIOLOGY\"\n },\n \"sections\": [\n {\n \"loinc\": \"10164-2\"\n }\n ],\n \"visit\": {\n \"chief_complaint\": \"Headache\",\n \"encounter_type\": \"AMBULATORY\",\n \"reason_for_visit\": \"Follow-up for migraines\",\n \"visit_type\": \"ESTABLISHED_PATIENT\"\n }\n}"
response = http.request(request)
puts response.read_bodyThis response has no body data.{
"code": 400,
"message": "invalid request"
}{
"code": 401,
"message": "invalid token"
}{
"code": 403,
"message": "forbidden"
}{
"code": 404,
"message": "not found"
}{
"code": 500,
"message": "internal server error"
}- details (e.g., specialty and role).
- Patient and visit information.
- A list of codes for the clinical sections you want to generate.
- Existing with their associated medical codes.
- EMR context, including target EMR, when you need EMR-specific behavior (for example order submission rules).
- Orders context (medication orders), including structured medication orders for active medications and related metadata.
Codes section to provide additional context for a session, such as medical codes for a diagnosis.Field validation and constraints
-
Character Limits: Ensure the
chief_complaintandreason_for_visitfields do not exceed 255 characters. -
Enumerated Values: Use only the predefined string values for
visit_type,encounter_type, andprovider_role. -
EMR Selection: You must set
emr.target_emrto one of the following:ATHENA,EPIC, orCERNER.
Medication order requirements
When you sendorders.medication_orders.values, include the following required properties for each object:
- Drug Information: Provide both the
drug_nameand amedication_code. - Coding Systems: For
medication_code, specify thecodeand set thetypetoRXCUIorNDC. - Order Status: Set the
statustoACTIVE,DISCONTINUED, orREFILLED. - Metadata: Include the
metadataobject with a requiredoriginofEMRorSUKI_AMBIENT.
origin to EMR, you must also set metadata.encounter_relation to either CURRENT_ENCOUNTER or PRIOR_ENCOUNTER.linked_diagnosis_codes match a diagnosis already provided in the diagnoses section.
Use the same coding system for both to allow the service to validate the link.Code examples
- Python
- TypeScript
import requests
ambient_session_id = "123dfg-456dfg-789dfg-012dfg"
url = f"https://sdp.suki-stage.com/api/v1/ambient/session/{ambient_session_id}/context"
headers = {
"sdp_suki_token": "<sdp_suki_token>",
"sdp_provider_id": "<sdp_provider_id>",
"Content-Type": "application/json"
}
payload = {
"provider": {
"specialty": "CARDIOLOGY",
"provider_role": "ATTENDING"
},
"patient": {
"dob": "2000-01-01",
"sex": "male"
},
"visit": {
"chief_complaint": "Headache",
"encounter_type": "AMBULATORY",
"reason_for_visit": "Follow-up for migraines",
"visit_type": "ESTABLISHED_PATIENT"
},
"sections": [
{"loinc": "10164-2"},
{"loinc": "48765-2"}
],
"diagnoses": {
"values": [
{
"codes": [
{
"code": "I10",
"description": "Essential hypertension",
"type": "ICD10"
}
],
"diagnosis_note": "Hypertension"
}
]
},
"emr": {
"target_emr": "EPIC"
},
"orders": {
"medication_orders": {
"values": [
{
"drug_name": "Acetaminophen 500mg Tab",
"medication_code": {"code": "860975", "type": "RXCUI"},
"linked_diagnosis_codes": [
{"code": "I10", "type": "ICD10"}
],
"metadata": {"origin": "SUKI_AMBIENT"},
"status": "ACTIVE",
"instructions": "Take with food"
}
]
}
}
}
response = requests.post(url, json=payload, headers=headers)
if response.status_code == 200:
print("Context seeded successfully")
else:
print(f"Failed to seed context: {response.status_code}")
print(response.json())
const ambientSessionId = '123dfg-456dfg-789dfg-012dfg';
const response = await fetch(
`https://sdp.suki-stage.com/api/v1/ambient/session/${ambientSessionId}/context`,
{
method: 'POST',
headers: {
'sdp_suki_token': '<sdp_suki_token>',
'sdp_provider_id': '<sdp_provider_id>',
'Content-Type': 'application/json'
},
body: JSON.stringify({
provider: {
specialty: 'CARDIOLOGY',
provider_role: 'ATTENDING'
},
patient: {
dob: '2000-01-01',
sex: 'male'
},
visit: {
chief_complaint: 'Headache',
encounter_type: 'AMBULATORY',
reason_for_visit: 'Follow-up for migraines',
visit_type: 'ESTABLISHED_PATIENT'
},
sections: [
{ loinc: '10164-2' },
{ loinc: '48765-2' }
],
diagnoses: {
values: [
{
codes: [
{
code: 'I10',
description: 'Essential hypertension',
type: 'ICD10'
}
],
diagnosis_note: 'Hypertension'
}
]
},
emr: {
target_emr: 'EPIC'
},
orders: {
medication_orders: {
values: [
{
drug_name: 'Acetaminophen 500mg Tab',
medication_code: { code: '860975', type: 'RXCUI' },
linked_diagnosis_codes: [{ code: 'I10', type: 'ICD10' }],
metadata: { origin: 'SUKI_AMBIENT' },
status: 'ACTIVE',
instructions: 'Take with food'
}
]
}
}
})
}
);
if (response.ok) {
console.log('Context seeded successfully');
} else {
const error = await response.json();
console.error(`Failed to seed context: ${response.status}`, error);
}
Authorizations
Suki access token for the authenticated provider. Obtain this by calling Login or Register with a valid partner_token. Pass the suki_token value from the JSON response as the sdp_suki_token header on REST requests and non-browser WebSocket upgrades. Browser WebSocket clients pass the token in Sec-WebSocket-Protocol instead. Tokens expire after one hour; call Login again to refresh.
Headers
Optional - Stable identifier for the active provider. Omit for standard partners whose partner_token identifies the user. Required for Bearer partners and Single Auth Token authentication where multiple providers share one partner_token. Use the same provider_id you sent on Login or Register.
"provider-123"
Path Parameters
UUID for the ambient session. Use the ambient_session_id returned from Create Ambient Session, or the UUID you supplied in that request.
Body
Clinical context for the ambient session, including provider, patient, visit, sections, diagnoses, EMR, and medication orders.
Optional - Existing diagnoses and coded values to include in note generation.
Show child attributes
Show child attributes
Optional - EMR context, including the target EMR system.
Show child attributes
Show child attributes
Optional - Medication orders and related order context.
Show child attributes
Show child attributes
Optional - Patient demographics such as date of birth and sex.
Show child attributes
Show child attributes
Optional - Provider role and specialty for the session.
Show child attributes
Show child attributes
Optional - Information about the sections to be generated. If not provided, all supported note-sections will be generated.
Show child attributes
Show child attributes
Optional - Visit details such as chief complaint and encounter type.
Show child attributes
Show child attributes
Response
Was this page helpful?
curl --request POST \
--url https://sdp.suki.ai/api/v1/ambient/session/<ambient_session_id>/context \
--header 'Content-Type: application/json' \
--header 'sdp_suki_token: <sdp_suki_token>' \
--header 'sdp_provider_id: <sdp_provider_id>' \
--data '{
"diagnoses": {
"values": [
{
"codes": [
{
"code": "30422",
"description": "Essential hypertension",
"type": "IMO"
}
],
"diagnosis_note": "Hypertension"
}
]
},
"emr": {
"target_emr": "ATHENA"
},
"orders": {
"medication_orders": {
"values": [
{
"dosage": {
"quantity": 1,
"raw_value": "1 tablet",
"unit": "TAB"
},
"drug_name": "Acetaminophen 500mg Tab",
"duration_in_days": 7,
"end_date": "2026-01-08T00:00:00Z",
"format": {
"raw_value": "Tablet"
},
"frequency": {
"raw_value": "once daily",
"structured_value": "ONE_A_DAY"
},
"instructions": "Take with food",
"linked_diagnosis_codes": [
{
"code": "I10",
"type": "ICD10"
}
],
"medication_code": {
"code": "860975",
"type": "RXCUI"
},
"medication_timing": {
"raw_value": "morning",
"structured_value": "IN_THE_MORNING"
},
"metadata": {
"encounter_relation": "CURRENT_ENCOUNTER",
"origin": "SUKI_AMBIENT"
},
"number_of_refills": 3,
"quantity_dispensed": "1 box",
"route": {
"raw_value": "Oral"
},
"start_date": "2026-01-01T00:00:00Z",
"status": "ACTIVE",
"strength": {
"raw_value": "500mg"
}
}
]
}
},
"patient": {
"dob": "2000-01-01",
"sex": "male"
},
"provider": {
"role": "ATTENDING",
"specialty": "CARDIOLOGY"
},
"sections": [
{
"loinc": "10164-2"
}
],
"visit": {
"chief_complaint": "Headache",
"encounter_type": "AMBULATORY",
"reason_for_visit": "Follow-up for migraines",
"visit_type": "ESTABLISHED_PATIENT"
}
}'import requests
url = "https://sdp.suki.ai/api/v1/ambient/session/{ambient_session_id}/context"
payload = {
"diagnoses": { "values": [
{
"codes": [
{
"code": "30422",
"description": "Essential hypertension",
"type": "IMO"
}
],
"diagnosis_note": "Hypertension"
}
] },
"emr": { "target_emr": "ATHENA" },
"orders": { "medication_orders": { "values": [
{
"dosage": {
"quantity": 1,
"raw_value": "1 tablet",
"unit": "TAB"
},
"drug_name": "Acetaminophen 500mg Tab",
"duration_in_days": 7,
"end_date": "2026-01-08T00:00:00Z",
"format": { "raw_value": "Tablet" },
"frequency": {
"raw_value": "once daily",
"structured_value": "ONE_A_DAY"
},
"instructions": "Take with food",
"linked_diagnosis_codes": [
{
"code": "I10",
"type": "ICD10"
}
],
"medication_code": {
"code": "860975",
"type": "RXCUI"
},
"medication_timing": {
"raw_value": "morning",
"structured_value": "IN_THE_MORNING"
},
"metadata": {
"encounter_relation": "CURRENT_ENCOUNTER",
"origin": "SUKI_AMBIENT"
},
"number_of_refills": 3,
"quantity_dispensed": "1 box",
"route": { "raw_value": "Oral" },
"start_date": "2026-01-01T00:00:00Z",
"status": "ACTIVE",
"strength": { "raw_value": "500mg" }
}
] } },
"patient": {
"dob": "2000-01-01",
"sex": "male"
},
"provider": {
"role": "ATTENDING",
"specialty": "CARDIOLOGY"
},
"sections": [{ "loinc": "10164-2" }],
"visit": {
"chief_complaint": "Headache",
"encounter_type": "AMBULATORY",
"reason_for_visit": "Follow-up for migraines",
"visit_type": "ESTABLISHED_PATIENT"
}
}
headers = {
"sdp_suki_token": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {sdp_suki_token: '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
diagnoses: {
values: [
{
codes: [{code: '30422', description: 'Essential hypertension', type: 'IMO'}],
diagnosis_note: 'Hypertension'
}
]
},
emr: {target_emr: 'ATHENA'},
orders: {
medication_orders: {
values: [
{
dosage: {quantity: 1, raw_value: '1 tablet', unit: 'TAB'},
drug_name: 'Acetaminophen 500mg Tab',
duration_in_days: 7,
end_date: '2026-01-08T00:00:00Z',
format: {raw_value: 'Tablet'},
frequency: {raw_value: 'once daily', structured_value: 'ONE_A_DAY'},
instructions: 'Take with food',
linked_diagnosis_codes: [{code: 'I10', type: 'ICD10'}],
medication_code: {code: '860975', type: 'RXCUI'},
medication_timing: {raw_value: 'morning', structured_value: 'IN_THE_MORNING'},
metadata: {encounter_relation: 'CURRENT_ENCOUNTER', origin: 'SUKI_AMBIENT'},
number_of_refills: 3,
quantity_dispensed: '1 box',
route: {raw_value: 'Oral'},
start_date: '2026-01-01T00:00:00Z',
status: 'ACTIVE',
strength: {raw_value: '500mg'}
}
]
}
},
patient: {dob: '2000-01-01', sex: 'male'},
provider: {role: 'ATTENDING', specialty: 'CARDIOLOGY'},
sections: [{loinc: '10164-2'}],
visit: {
chief_complaint: 'Headache',
encounter_type: 'AMBULATORY',
reason_for_visit: 'Follow-up for migraines',
visit_type: 'ESTABLISHED_PATIENT'
}
})
};
fetch('https://sdp.suki.ai/api/v1/ambient/session/{ambient_session_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/session/{ambient_session_id}/context",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'diagnoses' => [
'values' => [
[
'codes' => [
[
'code' => '30422',
'description' => 'Essential hypertension',
'type' => 'IMO'
]
],
'diagnosis_note' => 'Hypertension'
]
]
],
'emr' => [
'target_emr' => 'ATHENA'
],
'orders' => [
'medication_orders' => [
'values' => [
[
'dosage' => [
'quantity' => 1,
'raw_value' => '1 tablet',
'unit' => 'TAB'
],
'drug_name' => 'Acetaminophen 500mg Tab',
'duration_in_days' => 7,
'end_date' => '2026-01-08T00:00:00Z',
'format' => [
'raw_value' => 'Tablet'
],
'frequency' => [
'raw_value' => 'once daily',
'structured_value' => 'ONE_A_DAY'
],
'instructions' => 'Take with food',
'linked_diagnosis_codes' => [
[
'code' => 'I10',
'type' => 'ICD10'
]
],
'medication_code' => [
'code' => '860975',
'type' => 'RXCUI'
],
'medication_timing' => [
'raw_value' => 'morning',
'structured_value' => 'IN_THE_MORNING'
],
'metadata' => [
'encounter_relation' => 'CURRENT_ENCOUNTER',
'origin' => 'SUKI_AMBIENT'
],
'number_of_refills' => 3,
'quantity_dispensed' => '1 box',
'route' => [
'raw_value' => 'Oral'
],
'start_date' => '2026-01-01T00:00:00Z',
'status' => 'ACTIVE',
'strength' => [
'raw_value' => '500mg'
]
]
]
]
],
'patient' => [
'dob' => '2000-01-01',
'sex' => 'male'
],
'provider' => [
'role' => 'ATTENDING',
'specialty' => 'CARDIOLOGY'
],
'sections' => [
[
'loinc' => '10164-2'
]
],
'visit' => [
'chief_complaint' => 'Headache',
'encounter_type' => 'AMBULATORY',
'reason_for_visit' => 'Follow-up for migraines',
'visit_type' => 'ESTABLISHED_PATIENT'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"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"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sdp.suki.ai/api/v1/ambient/session/{ambient_session_id}/context"
payload := strings.NewReader("{\n \"diagnoses\": {\n \"values\": [\n {\n \"codes\": [\n {\n \"code\": \"30422\",\n \"description\": \"Essential hypertension\",\n \"type\": \"IMO\"\n }\n ],\n \"diagnosis_note\": \"Hypertension\"\n }\n ]\n },\n \"emr\": {\n \"target_emr\": \"ATHENA\"\n },\n \"orders\": {\n \"medication_orders\": {\n \"values\": [\n {\n \"dosage\": {\n \"quantity\": 1,\n \"raw_value\": \"1 tablet\",\n \"unit\": \"TAB\"\n },\n \"drug_name\": \"Acetaminophen 500mg Tab\",\n \"duration_in_days\": 7,\n \"end_date\": \"2026-01-08T00:00:00Z\",\n \"format\": {\n \"raw_value\": \"Tablet\"\n },\n \"frequency\": {\n \"raw_value\": \"once daily\",\n \"structured_value\": \"ONE_A_DAY\"\n },\n \"instructions\": \"Take with food\",\n \"linked_diagnosis_codes\": [\n {\n \"code\": \"I10\",\n \"type\": \"ICD10\"\n }\n ],\n \"medication_code\": {\n \"code\": \"860975\",\n \"type\": \"RXCUI\"\n },\n \"medication_timing\": {\n \"raw_value\": \"morning\",\n \"structured_value\": \"IN_THE_MORNING\"\n },\n \"metadata\": {\n \"encounter_relation\": \"CURRENT_ENCOUNTER\",\n \"origin\": \"SUKI_AMBIENT\"\n },\n \"number_of_refills\": 3,\n \"quantity_dispensed\": \"1 box\",\n \"route\": {\n \"raw_value\": \"Oral\"\n },\n \"start_date\": \"2026-01-01T00:00:00Z\",\n \"status\": \"ACTIVE\",\n \"strength\": {\n \"raw_value\": \"500mg\"\n }\n }\n ]\n }\n },\n \"patient\": {\n \"dob\": \"2000-01-01\",\n \"sex\": \"male\"\n },\n \"provider\": {\n \"role\": \"ATTENDING\",\n \"specialty\": \"CARDIOLOGY\"\n },\n \"sections\": [\n {\n \"loinc\": \"10164-2\"\n }\n ],\n \"visit\": {\n \"chief_complaint\": \"Headache\",\n \"encounter_type\": \"AMBULATORY\",\n \"reason_for_visit\": \"Follow-up for migraines\",\n \"visit_type\": \"ESTABLISHED_PATIENT\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("sdp_suki_token", "<api-key>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://sdp.suki.ai/api/v1/ambient/session/{ambient_session_id}/context")
.header("sdp_suki_token", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"diagnoses\": {\n \"values\": [\n {\n \"codes\": [\n {\n \"code\": \"30422\",\n \"description\": \"Essential hypertension\",\n \"type\": \"IMO\"\n }\n ],\n \"diagnosis_note\": \"Hypertension\"\n }\n ]\n },\n \"emr\": {\n \"target_emr\": \"ATHENA\"\n },\n \"orders\": {\n \"medication_orders\": {\n \"values\": [\n {\n \"dosage\": {\n \"quantity\": 1,\n \"raw_value\": \"1 tablet\",\n \"unit\": \"TAB\"\n },\n \"drug_name\": \"Acetaminophen 500mg Tab\",\n \"duration_in_days\": 7,\n \"end_date\": \"2026-01-08T00:00:00Z\",\n \"format\": {\n \"raw_value\": \"Tablet\"\n },\n \"frequency\": {\n \"raw_value\": \"once daily\",\n \"structured_value\": \"ONE_A_DAY\"\n },\n \"instructions\": \"Take with food\",\n \"linked_diagnosis_codes\": [\n {\n \"code\": \"I10\",\n \"type\": \"ICD10\"\n }\n ],\n \"medication_code\": {\n \"code\": \"860975\",\n \"type\": \"RXCUI\"\n },\n \"medication_timing\": {\n \"raw_value\": \"morning\",\n \"structured_value\": \"IN_THE_MORNING\"\n },\n \"metadata\": {\n \"encounter_relation\": \"CURRENT_ENCOUNTER\",\n \"origin\": \"SUKI_AMBIENT\"\n },\n \"number_of_refills\": 3,\n \"quantity_dispensed\": \"1 box\",\n \"route\": {\n \"raw_value\": \"Oral\"\n },\n \"start_date\": \"2026-01-01T00:00:00Z\",\n \"status\": \"ACTIVE\",\n \"strength\": {\n \"raw_value\": \"500mg\"\n }\n }\n ]\n }\n },\n \"patient\": {\n \"dob\": \"2000-01-01\",\n \"sex\": \"male\"\n },\n \"provider\": {\n \"role\": \"ATTENDING\",\n \"specialty\": \"CARDIOLOGY\"\n },\n \"sections\": [\n {\n \"loinc\": \"10164-2\"\n }\n ],\n \"visit\": {\n \"chief_complaint\": \"Headache\",\n \"encounter_type\": \"AMBULATORY\",\n \"reason_for_visit\": \"Follow-up for migraines\",\n \"visit_type\": \"ESTABLISHED_PATIENT\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://sdp.suki.ai/api/v1/ambient/session/{ambient_session_id}/context")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["sdp_suki_token"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"diagnoses\": {\n \"values\": [\n {\n \"codes\": [\n {\n \"code\": \"30422\",\n \"description\": \"Essential hypertension\",\n \"type\": \"IMO\"\n }\n ],\n \"diagnosis_note\": \"Hypertension\"\n }\n ]\n },\n \"emr\": {\n \"target_emr\": \"ATHENA\"\n },\n \"orders\": {\n \"medication_orders\": {\n \"values\": [\n {\n \"dosage\": {\n \"quantity\": 1,\n \"raw_value\": \"1 tablet\",\n \"unit\": \"TAB\"\n },\n \"drug_name\": \"Acetaminophen 500mg Tab\",\n \"duration_in_days\": 7,\n \"end_date\": \"2026-01-08T00:00:00Z\",\n \"format\": {\n \"raw_value\": \"Tablet\"\n },\n \"frequency\": {\n \"raw_value\": \"once daily\",\n \"structured_value\": \"ONE_A_DAY\"\n },\n \"instructions\": \"Take with food\",\n \"linked_diagnosis_codes\": [\n {\n \"code\": \"I10\",\n \"type\": \"ICD10\"\n }\n ],\n \"medication_code\": {\n \"code\": \"860975\",\n \"type\": \"RXCUI\"\n },\n \"medication_timing\": {\n \"raw_value\": \"morning\",\n \"structured_value\": \"IN_THE_MORNING\"\n },\n \"metadata\": {\n \"encounter_relation\": \"CURRENT_ENCOUNTER\",\n \"origin\": \"SUKI_AMBIENT\"\n },\n \"number_of_refills\": 3,\n \"quantity_dispensed\": \"1 box\",\n \"route\": {\n \"raw_value\": \"Oral\"\n },\n \"start_date\": \"2026-01-01T00:00:00Z\",\n \"status\": \"ACTIVE\",\n \"strength\": {\n \"raw_value\": \"500mg\"\n }\n }\n ]\n }\n },\n \"patient\": {\n \"dob\": \"2000-01-01\",\n \"sex\": \"male\"\n },\n \"provider\": {\n \"role\": \"ATTENDING\",\n \"specialty\": \"CARDIOLOGY\"\n },\n \"sections\": [\n {\n \"loinc\": \"10164-2\"\n }\n ],\n \"visit\": {\n \"chief_complaint\": \"Headache\",\n \"encounter_type\": \"AMBULATORY\",\n \"reason_for_visit\": \"Follow-up for migraines\",\n \"visit_type\": \"ESTABLISHED_PATIENT\"\n }\n}"
response = http.request(request)
puts response.read_bodyThis response has no body data.{
"code": 400,
"message": "invalid request"
}{
"code": 401,
"message": "invalid token"
}{
"code": 403,
"message": "forbidden"
}{
"code": 404,
"message": "not found"
}{
"code": 500,
"message": "internal server error"
}