API Documentation

Developer guide for SynThera API

SynThera API Documentation

The SynThera API provides secure, RESTful access to advanced clinical AI capabilities. Built for healthcare developers, our API enables seamless integration of medical intelligence into your applications with enterprise-grade security and HIPAA compliance.

Base URL

https://api.synthera.health/v1

All API endpoints are accessed via HTTPS with API key authentication.

Authentication

SynThera API uses API key authentication. Include your API key in the Authorization header:

curl -H "Authorization: Bearer YOUR_API_KEY"      -H "Content-Type: application/json"      https://api.synthera.health/v1/analyze

Development Environment

Use sandbox API keys for testing:

sk_test_...

Production Environment

Use live API keys for production:

sk_live_...

Core API Endpoints

Clinical Analysis

POST

Analyze patient data to generate clinical insights, risk assessments, and treatment recommendations.

POST /v1/analyze
Request Body:
{
  "patient_data": {
    "demographics": {
      "age": 65,
      "gender": "M",
      "medical_history": ["hypertension", "diabetes"]
    },
    "vitals": {
      "blood_pressure": "160/95",
      "heart_rate": 88,
      "temperature": 98.6
    },
    "symptoms": ["chest pain", "shortness of breath"],
    "lab_results": {
      "troponin": 0.15,
      "bnp": 450,
      "creatinine": 1.2
    }
  },
  "analysis_type": "comprehensive",
  "specialty": "cardiology"
}
Response:
{
  "analysis_id": "analysis_12345",
  "risk_score": 7.2,
  "primary_diagnosis": "Acute coronary syndrome",
  "differential_diagnosis": [
    "STEMI",
    "NSTEMI",
    "Unstable angina"
  ],
  "recommendations": [
    "Immediate cardiology consultation",
    "Serial ECGs",
    "Continuous cardiac monitoring"
  ],
  "confidence_score": 0.89,
  "urgency_level": "high",
  "created_at": "2024-01-15T10:30:00Z"
}

Voice Transcription

POST

Convert medical audio recordings to structured text with clinical entity extraction.

POST /v1/transcribe
Request (Multipart Form):
curl -X POST https://api.synthera.health/v1/transcribe   -H "Authorization: Bearer YOUR_API_KEY"   -F "audio=@consultation.wav"   -F "language=en-US"   -F "specialty=cardiology"   -F "return_entities=true"
Response:
{
  "transcription_id": "trans_67890",
  "text": "Patient presents with chest pain radiating to left arm, started 2 hours ago. Blood pressure is elevated at 160 over 95. EKG shows ST elevation in leads V2 through V4.",
  "medical_entities": [
    {
      "text": "chest pain",
      "type": "symptom",
      "confidence": 0.95
    },
    {
      "text": "ST elevation",
      "type": "finding",
      "confidence": 0.92
    }
  ],
  "confidence_score": 0.94,
  "duration": 45.3,
  "created_at": "2024-01-15T10:45:00Z"
}

Medical Imaging Analysis

POST

AI-powered analysis of medical images including X-rays, CT scans, and MRIs.

POST /v1/imaging/analyze
Request Body:
{
  "image_data": "base64_encoded_image_data",
  "image_type": "chest_xray",
  "modality": "XR",
  "patient_context": {
    "age": 45,
    "gender": "F",
    "clinical_question": "rule out pneumonia"
  },
  "analysis_options": {
    "detect_abnormalities": true,
    "measure_structures": false,
    "compare_to_prior": false
  }
}
Response:
{
  "analysis_id": "img_analysis_456",
  "findings": [
    {
      "finding": "Right lower lobe opacity",
      "location": {
        "x": 0.65,
        "y": 0.75,
        "width": 0.15,
        "height": 0.12
      },
      "confidence": 0.87,
      "severity": "moderate"
    }
  ],
  "impression": "Findings consistent with right lower lobe pneumonia",
  "recommendations": [
    "Clinical correlation recommended",
    "Consider antibiotic therapy"
  ],
  "confidence_score": 0.85,
  "created_at": "2024-01-15T11:00:00Z"
}

FHIR Integration

SynThera supports FHIR R4 for seamless integration with healthcare systems and EHRs.

FHIR Patient Resource

GET /v1/fhir/Patient/{id}

Retrieve patient demographic and clinical data in FHIR format

FHIR Observation

POST /v1/fhir/Observation

Submit clinical observations and measurements

FHIR DiagnosticReport

GET /v1/fhir/DiagnosticReport

Retrieve AI-generated diagnostic reports

FHIR Condition

POST /v1/fhir/Condition

Create or update patient conditions and diagnoses

Error Handling

The SynThera API uses conventional HTTP response codes to indicate success or failure.

Success Codes

  • 200 - OK: Request successful
  • 201 - Created: Resource created
  • 202 - Accepted: Processing started

Error Codes

  • 400 - Bad Request: Invalid parameters
  • 401 - Unauthorized: Invalid API key
  • 429 - Rate Limited: Too many requests
  • 500 - Server Error: Internal error

Error Response Format:

{
  "error": {
    "code": "validation_error",
    "message": "Invalid patient data format",
    "details": {
      "field": "patient_data.age",
      "issue": "must be a positive integer"
    },
    "request_id": "req_12345",
    "timestamp": "2024-01-15T10:30:00Z"
  }
}

Rate Limiting

Developer Plan

  • 100 requests/minute
  • 1,000 requests/day
  • Best effort support

Professional Plan

  • 1,000 requests/minute
  • 50,000 requests/day
  • Priority support

Enterprise Plan

  • Custom rate limits
  • Unlimited requests
  • Dedicated support

Rate Limit Headers

Monitor your usage with these response headers:

X-RateLimit-Limit: 1000
X-RateLimit-Remaining: 850
X-RateLimit-Reset: 1642176000

SDK Integration

While you can use the REST API directly, we recommend using our official SDKs for easier integration: