POST
/
v1
/
macros
/
detect
curl --request POST \
  --url https://api.sully.ai/v1/macros/detect \
  --header 'Content-Type: application/json' \
  --header 'X-ACCOUNT-ID: <api-key>' \
  --header 'X-API-KEY: <api-key>' \
  --data '{
  "text": "The patient is a 54-year-old male here for a routine follow-up. Reports feeling well overall. Quickcheck. Denies any new symptoms. Medications reviewed and no changes needed. No signs of infection. Standard plan applies. Discussed flu vaccine and colonoscopy timeline. Return visit scheduled in six months.",
  "macros": [
    {
      "id": "brief_exam_note",
      "examples": [
        "quickcheck",
        "quick check",
        "quick-check"
      ],
      "expansion_text": "General: Patient appears well-nourished and in no acute distress. HEENT: Normocephalic, atraumatic. Heart: Regular rate and rhythm. Lungs: Clear to auscultation bilaterally."
    }
  ]
}'
{
  "data": {
    "detections": [
      {
        "macro_id": "brief_exam_note",
        "text_span": {
          "start_char": 94,
          "end_char": 104,
          "text": "Quickcheck"
        },
        "confidence": 0.98
      }
    ],
    "expanded_text": "The patient is a 54-year-old male here for a routine follow-up. Reports feeling well overall. General: Patient appears well-nourished and in no acute distress. HEENT: Normocephalic, atraumatic. Heart: Regular rate and rhythm. Lungs: Clear to auscultation bilaterally.. Denies any new symptoms. Medications reviewed and no changes needed. No signs of infection. Plan: Continue current medications. Reassess in 6 months or as needed. Patient advised to follow up for any new or worsening symptoms. applies. Discussed flu vaccine and colonoscopy timeline. Return visit scheduled in six months."
  }
}

Authorizations

X-API-KEY
string
header
required
X-ACCOUNT-ID
string
header
required

Body

application/json

Text to analyze for macros

Request payload for detecting and expanding macros in medical text

Response

200
application/json

Macro detection result

Response containing detected macros and expanded text