API Documentation - Yesil Health AI

Yesil Health AI API

Integrate our powerful medical AI into your healthcare applications

Getting Started

Our REST API provides programmatic access to Yesil Health AI's medical consultation capabilities. You can integrate our AI models into your healthcare applications, enabling your users to receive evidence-based medical information.

Authentication

All API requests require authentication using your API key. Include it in the request headers:

X-API-Key: YOUR_API_KEY

API Endpoints

Medical Consultation

POST

/consultation

Generate an AI response for medical queries using our specialized models.

Headers
'Content-Type': 'application/json'
'Accept': 'text/event-stream'
'Origin': your-domain-origin
'X-API-Key': YOUR_API_KEY
Request Body
{
  "question": "What are the common symptoms of diabetes?",
  "api_model": "yesil-o1-pro"  // or "yesil-o1-mini"
}
Parameters
  • question - The medical query from the user
  • api_model - The AI model to use:
    • • yesil-o1-pro: Advanced model for Pro tier
    • • yesil-o1-mini: Standard model for Basic tier

Response Format

The API returns a server-sent events (SSE) stream that provides real-time updates about the consultation process. The response includes status updates, specialty determinations, and the final consultation.

Stream Events
STATUS:PROCESSING_STARTED
STATUS:SPECIALTIES_DETERMINED
SPECIALTIES:Endocrinology,Internal Medicine
STATUS:LOADING_RAG:Endocrinology
STATUS:CONSULTING:Endocrinology
CONSULTATION:Endocrinology:Detailed consultation from endocrinology perspective...
STATUS:SPECIALTY_COMPLETE:Endocrinology
PROGRESS:1/2
STATUS:LOADING_RAG:Internal Medicine
STATUS:CONSULTING:Internal Medicine
CONSULTATION:Internal Medicine:Additional insights from internal medicine...
STATUS:SPECIALTY_COMPLETE:Internal Medicine
PROGRESS:2/2
STATUS:GENERATING_FINAL
FINAL_RESPONSE:Comprehensive analysis and recommendations...
STATUS:COMPLETED
Status Types
  • PROCESSING_STARTED - Initial processing of the query
  • SPECIALTIES_DETERMINED - Relevant medical specialties identified
  • LOADING_RAG:{specialty} - Loading knowledge base for specific specialty
  • CONSULTING:{specialty} - Generating specialty-specific consultation
  • SPECIALTY_COMPLETE:{specialty} - Specialty consultation completed
  • PROGRESS:{current}/{total} - Progress through specialties
  • GENERATING_FINAL - Synthesizing final response
  • COMPLETED - Consultation process finished
Error Handling
ERROR:{specialty}:Error message
ERROR:GENERAL:General error message
STATUS:ERROR
Non-Health Questions
STATUS:NON_HEALTH
Specialties determined: Nohealth
Final Response: I apologize, but I can only assist with health-related questions...

Ready to Get Started?

Create an account and get your API key today

Get API Key

Get information about business sale

Contact our sales team today to schedule a demo and explore how our solution can transform your organization.