PROVAR Brazil - PRESENT-SHD

Authentication

All API requests require authentication via HTTP headers:

user-id: <your-user-id-uuid>
api-key: <your-api-key>

Note: user-id must be a valid UUID, and api-key must be 32 or 64 characters long.

API Endpoints

Health Check

GET
/api/v1/health

Check API health status. No authentication required.

Example Request:
curl -X GET https://api-platform.cards-lab.org/api/v1/health

Process File

POST
/api/v1/process

Process a JSON file with a specified model.

Required Headers:

  • user-id: Your user identifier (UUID format)
  • api-key: Your API authentication key

Required Parameters:

  • file: JSON file to process (multipart/form-data)
  • model: Model name (currently: present-shd)
  • age: Age parameter (required for present-shd model, integer 0-150)
  • sex: Sex parameter (required for present-shd model: male, female, m, or f)
  • output_format: Output format (currently: json only)

Example Request:

curl -X POST https://api-platform.cards-lab.org/api/v1/process \
-H "user-id: 'provided-user-id'">" \
-H "api-key: 'provided-api-key'" \
-F "file=@data.json" \
-F "model=present-shd" \
-F "age=45" \
-F "sex=male" \
-F "output_format=json"
import requests

url = "https://api-platform.cards-lab.org/api/v1/process"
headers = {
    "user-id": "",
    "api-key": ""
}
files = {
    "file": ("data.json", open("data.json", "rb"), "application/json")
}
data = {
    "model": "present-shd",
    "age": "45",
    "sex": "male",
    "output_format": "json"
}

response = requests.post(url, headers=headers, files=files, data=data)
print(response.json())

Example Response:

{"status": "success",
"job_id": "a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6",
"user_id": "206d1a97-b512-4e7d-a9e1-d83f94799a88",
"model": "present-shd",
"processing_time_ms": 123.45,
"patient_info": {"age": 45, "sex": "male"},
"predictions": {"final_prediction": {"classification": "Negative SHD Screen", "probability": 0.07718605548143387, "probability_percent": 7.72, "threshold": 0.204646}, "model_predictions": {...}},
"processing_time_seconds": 45.86,
"timestamp": "2025-12-12 22:35:12"}

Available Models

present-shd

Process medical card data using the Present-SHD model.

Required Parameters:

  • age: Patient age (integer, 0-150)
  • sex: Patient sex (male, female, m, or f)

Input Format:

JSON file containing ECG data with leads as semicolon-separated strings.

Output Format:

JSON response with processed results including predictions and patient information.

Error Responses

The API uses standard HTTP status codes:

  • 200: Success
  • 400: Bad Request (missing or invalid parameters)
  • 401: Unauthorized (missing, invalid, or incorrect user-id/api-key)
  • 403: Forbidden (account inactive or API access disabled)
  • 429: Too Many Requests (quota exceeded)
  • 500: Internal Server Error

Error responses include an error field, a message field with details, and a job_id (if available).

Common Error Scenarios:

  • Invalid user-id: The provided user-id does not exist in the system
  • Invalid api-key: The provided api-key is incorrect for the given user-id
  • Account inactive: The user account has been deactivated
  • API access disabled: API access has been disabled for this account
  • Quota exceeded: The user has reached their API request quota limit

Test the API