Diagnosis API
Create session
Starts a new interactive diagnostic session. provide the patient's initial information
(age, sex, and the input text of the patient) to create a session and receive the first question.
A unique session_id
is returned, which you must use for all subsequent calls.
AuthorizationBearer <token>
In: header
max_questions?Max Questions
Maximum number of questions per session. If left empty, the session averages 10-20 questions.
Default
99
ageAge
The age of the patient in years.
Range
0 <= value <= 130
sexSex
The biological sex of the patient. Possible values are 'male', 'female'.
Value in
"male" | "female"
inputInput
Free-text input describing the patient's symptoms.
Response Body
curl -X POST "https://api.avey.ai/ddx/session" \ -H "Content-Type: application/json" \ -d '{ "age": 34, "sex": "male", "input": "My tummy hurts, and i feel like i don\'t want to eat anything" }'
{
"session_id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"question": {
"id": 1,
"media_url": 1,
"text": "Do you have a Lymphadenopathy?",
"description": "Lymphadenopathy is enlargement or swelling in one of your lymph nodes",
"target_concepts": [
{
"id": "Headache (Occipital region)",
"term": "Headache (Occipital region)"
},
{
"id": "Headache (Occipital region)",
"term": "Headache (Occipital region)"
}
]
},
"patient_info": {
"age": 34,
"sex": "male",
"chief_findings": [
{
"id": "Headache",
"status": "present",
"term": "Headache"
},
{
"id": "Fever",
"status": "present",
"term": "Fever"
}
],
"findings": [
{
"id": "Headache",
"status": "present",
"term": "Headache"
},
{
"id": "Fever",
"status": "present",
"term": "Fever"
},
{
"id": "Nasal block",
"status": "absent",
"term": "Nasal block"
},
{
"id": "Headache (Occipital region)",
"status": "unsure",
"term": "Headache (Occipital region)"
}
]
}
}
{
"detail": "Not authenticated"
}
{
"detail": "'input' must be provided."
}
{
"detail": "An unexpected internal error occurred."
}
How is this guide?