#
Response Format and Error Codes
All LeapAI CXR API endpoints return responses in a consistent JSON structure.
#
Standard Response Format
Every API response follows this schema:
{
"Result": "Success | Warning | Failure",
"Data": "<object | string | null>",
"Message": "Human-readable message"
}
#
HTTP Status Codes
#
Common Error Responses
#
Authentication Errors
#
Single Inference Errors
#
Bulk Inference Errors
#
Health Check
#
GET /ping
A simple health-check endpoint to verify the server is running.
{
"status": "ok"
}
The /ping endpoint does not require authentication and does not follow the standard response format.
#
Disease Findings Schema
Each entry in the findings array within the prediction output follows this schema:
{
"name": "string",
"presence": true,
"confidence": 0.0
}
Confidence Threshold
A disease is marked as presence: true when its confidence score is >= 0.5.
#
Conditions Covered
The findings array can include the following conditions:
- Tuberculosis
- Cardiomegaly
- Pleural Thickening
- Pleural Effusion
- Pneumothorax
- Consolidation
- Atelectasis
- Nodule/Mass
- Fibrosis
- Infiltration
- Calcification
#
Metadata Schema
{
"model_version": "<string>",
"patient_id": "<string>",
"patient_name": "<string>",
"sop_instance_uid": "<string>",
"age": "<string>",
"sex": "<string>"
}