API & Deployment
Enterprise-grade real-time deployment architecture for video-powered dental AI.
Enterprise-Grade Real-Time Deployment
Traditional medical AI systems rely on REST APIs, which require the client device to establish a new HTTP handshake for every single image upload. In a mobile video streaming context, this causes severe latency and system crashes. UGDent's deployment architecture bypasses REST entirely, using a persistent FastAPI WebSocket interface for sub-2-second diagnostic inference.
Deployment Architecture
Ultra-Low-Latency Clinical Intelligence
WebSocket Interface
Persistent connection eliminates HTTP handshake delays. Streams compressed video frames continuously for real-time processing.
GPU-Accelerated Cloud
CLIP Vision Transformer hosted on AWS EC2 with CUDA. Mixed-precision optimization for ultra-fast inference.
Containerized Deployment
Docker containerization ensures flawless functionality across diverse clinical IT environments.
FastAPI Backend
High-performance Python API with automatic OpenAPI documentation and async request handling.
API Endpoints
Real-Time Dental Diagnostics at Your Fingertips
Stream intraoral video frames for real-time disease classification and localization.
{
"frames": ["base64_frame_1", "base64_frame_2", ...],
"patient_id": "UGDENT-2024-001"
}
Response:
{
"classification": "Caries",
"confidence": 0.92,
"attention_map": "base64_heatmap",
"timestamp": "2024-01-15T10:30:00Z"
}
Monitor model health, latency, and system status during active sessions.
{
"status": "operational",
"latency": 1.8,
"model": "CLIP-ViT",
"version": "2.1.0",
"queue": 0
}
Retrieve available model versions and their performance specifications.
{
"models": [
{
"name": "CLIP-ViT-B16",
"accuracy": 0.87,
"memory": "600 MB",
"latency": "1.8s"
},
{
"name": "CLIP-ViT-L14",
"accuracy": 0.89,
"memory": "1.2 GB",
"latency": "3.2s"
}
]
}
All WebSocket endpoints maintain persistent connections for sub-2-second inference. Authentication required via API key.
Quick Integration
Integrating the UGDent WebSocket API into your tele-dentistry platform is straightforward. Here's a simple Python example to get you started.
import asyncio
import websockets
import json
import base64
async def diagnose(frame_b64):
uri = "wss://api.ugdent.health/v1/diagnose"
async with websockets.connect(uri) as websocket:
request = {
"frames": [frame_b64],
"patient_id": "UGDENT-2024-001"
}
await websocket.send(json.dumps(request))
response = await websocket.recv()
return json.loads(response)
# Usage
with open("tooth.jpg", "rb") as f:
frame = base64.b64encode(f.read()).decode("utf-8")
result = asyncio.run(diagnose(frame))
print(f"Diagnosis: {result['classification']}")
print(f"Confidence: {result['confidence']*100:.1f}%")
Sign Up for API Access
Request your API key through the Join the Venture page
Connect to WebSocket
Establish a persistent connection to wss://api.ugdent.health/v1/diagnose
Stream Video Frames
Send base64-encoded frames and receive real-time diagnostics
Why Integrate UGDent?
- Sub-2-second inference latency
- Real-time video stream processing
- Explainable AI attention maps
- Persistent WebSocket connection
- GPU-accelerated cloud infrastructure
- Uganda-built, locally governed
Ready to Integrate UGDent?
Upgrade your tele-dentistry platform with sub-2-second video-powered diagnostic intelligence.