| 400 | Summary is missing or invalid. | summary is required in the JSON body. |
| 400 | Provider or HCI configuration is invalid. | Missing or unknown provider ID, no consultation method/auth flow configured for the provider, missing or malformed clinic code, invalid CA origin, or the provider clinic limit is reached. |
| 401 | Authentication failed. | API key credentials are missing or invalid, a root clinic/key cannot be found, or no API key is linked to the authenticated clinic. |
| 429 | Usage limit reached. | Free-tier usage is exhausted, or a non-root paid API key has expired. |
| 500 | Unexpected server or upstream failure. | Unhandled JSON/form parsing errors, AI provider failures, transcription provider failures, database errors, or unexpected response parsing failures. |
1https://usescrubs.com



1curl --location 'https://usescrubs.com/api/v1/ddx' \
2--header 'X-Scrubs-Clinic-Code: 00A123' \
3--header 'X-Scrubs-Clinic-Provider: SAMPLE_EHR_1' \
4--header 'Content-Type: application/json' \
5--data '{
6 "summary": "Patient reports having a headache for the past week ...",
7 "additionalPatientInfo": "Patient previously diagnosed with Anxiety Disorder",
8 "numDdx": 2
9}'1{
2 "diagnosis": [
3 {
4 "diagnosis": "Migraine Headaches",
5 "explanation": "The pattern of headache, particularly the nausea and ...",
6 "recommendation": "Consider triptans for acute management and ..."
7 },
8 {
9 "diagnosis": "Cervicogenic Headache",
10 "explanation": "The symptomatology described could suggest ...",
11 "recommendation": "Evaluate for any cervical spine issues ..."
12 }
13 ]
14}