Sahl AI Note Generation API

Overview

The Note Generation API takes a list of transcript items and produces a structured clinical note. This API is designed to streamline the process of creating comprehensive medical notes from transcribed encounters.

Endpoint

URL: https://sau-api.sahl.ai/note/generate

Method: POST

Authentication

Include your bearer token in the Authorization header: Authorization: Bearer <YOUR_TOKEN>

Request Body

Content-Type: application/json

{
  "output_objects": ["note"],
  "language": "en-US",
  "transcript_items": [
    {
      "text": "Patient reports persistent headaches.",
      "speaker": "doctor"
    }
  ],
  "section_style": "paragraphs",
  "split_by_problem": false,
  "note_template": "GENERAL_MEDICINE",
  "note": {
    "sections": [
      {
        "key": "CHIEF_COMPLAINT",
        "title": "Chief Complaint",
        "text": "Persistent headaches"
      }
    ]
  },
  "patient_context": "John Doe, 45-year-old male, history of migraines"
}

Parameters

  • output_objects (array of strings, required): Specify which items to include in the response. Currently, only "note" is supported.
  • language (string, required): Language of the transcript and desired note. Options: "en".
  • transcript_items (array of objects, required): List of transcript items from the encounter.
  • note_template (string, optional): Template for the generated note. Options include "GENERAL_MEDICINE", "SOAP", etc.

Response

Success Response (200 OK)

Content-Type: application/json

[
  {
    "title": "Chief Complaint",
    "body": [
      "- 30-year-old patient experiencing shortness of breath for two days, especially when climbing stairs or exerting physical effort."
    ]
  },
  {
    "title": "History of Presentation",
    "body": [
      "- Shortness of breath began suddenly two days ago.",
      "- Symptoms occur with exertion, such as climbing stairs or walking a few meters.",
      "- Patient reports feeling tired but denies fever, cough, headache, visual disturbances, joint pain, and swelling in the lower limbs.",
      "- Able to walk to the nearby mosque, indicating some preserved functional capacity."
    ]
  },
  {
    "title": "Past medical and surgical history",
    "body": [
      "- Patient has a history of hypertension diagnosed since childhood.",
      "- Congenital heart disease with weakened heart muscle."
    ]
  },
  {
    "title": "Allergy",
    "body": ["- No allergy history discussed."]
  },
  {
    "title": "Medication",
    "body": [
      "- Patient is currently taking antihypertensive medications regularly."
    ]
  },
  {
    "title": "Social history",
    "body": [
      "- No information provided regarding smoking habits, alcohol consumption, lifestyle, social circumstances, functional status, or occupation."
    ]
  },
  {
    "title": "Family history",
    "body": ["- No family history of diseases discussed."]
  },
  {
    "title": "Examination",
    "body": [
      "- Patient appears tired but oriented to time, place, and space.",
      "- On auscultation, normal heart sounds S1 and S2 with a pan-systolic murmur were noted.",
      "- Clear air entry in the lungs with some basal crackles.",
      "- No lymphedema observed."
    ]
  },
  {
    "title": "Diagnosis/Impression",
    "body": [
      "- Shortness of breath likely related to underlying congenital heart disease and hypertension.",
      "- Possible heart failure needs to be evaluated by a cardiologist."
    ]
  },
  {
    "title": "Plan",
    "body": [
      "- Patient to continue antihypertensive medications.",
      "- ECG and further examination by a cardiac specialist are planned.",
      "- Urgent referral to a cardiologist expected within the week due to the severity of symptoms.",
      "- Advised to avoid excessive cold exposure."
    ]
  }
]

Error Response (400 Bad Request)

{
  "error": "Invalid request",
  "message": "Detailed error message"
}

Notes

  • The API generates a structured clinical note based on the provided transcript items and additional context.

Example Usage

curl -X POST 'https://sau-api.sahl.ai/note/generate' \
-H 'Content-Type: application/json' \
-H 'Authorization: Bearer <YOUR_TOKEN>' \
-d '{
  "output_objects": ["note"],
  "language": "en-US",
  "transcript_items": [
    {
      "text": "Patient reports persistent headaches.",
      "speaker": "doctor"
    }
  ],
  "section_style": "paragraphs",
  "note_template": "GENERAL_MEDICINE"
}'

This API allows for efficient generation of structured clinical notes from transcribed medical encounters, enhancing the documentation process for healthcare providers.