API Documentation

Complete reference for the DHAS Health API

Endpoints

POST/health-api/query

Send a health query to the API

Authentication

All API requests must include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Required Headers

HeaderValue
Content-Typeapplication/json
AuthorizationBearer YOUR_API_KEY

Request Body

{
  "query": "What are the symptoms of diabetes?",
  "endpoint": "general_query"
}

Response Example

{
  "result": "Diabetes symptoms include...",
  "confidence_score": 0.95,
  "sources": [
    {
      "title": "WHO Diabetes Guidelines",
      "url": "https://example.com",
      "reliability": 0.98
    }
  ],
  "tokens_used": 150,
  "response_time_ms": 245
}

Code Examples

curl -X POST https://api.dhashealth.com/health-api/query \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "query": "What are the symptoms of diabetes?",
    "endpoint": "general_query"
  }'

Rate Limits

  • • Trial: 100 requests per day
  • • Starter: 100 requests per minute
  • • Professional: 500 requests per minute
  • • Enterprise: Custom limits