MAI API Documentation

Integrate AI-powered medical analysis into your application. REST API with JSON responses.

Getting Started

Base URL: https://azora.lt

Authentication: Bearer token via Authorization: Bearer {token} header

All responses are JSON. Errors return {"detail": "ERROR_CODE"}

Authentication

POST/api/auth/register Public
Register a new user account
{"email": "user@example.com", "password": "securepass1", "name": "John", "language": "en"}
POST/api/auth/login Public
Login and receive JWT token
{"email": "user@example.com", "password": "securepass1"}
POST/api/auth/social Public
Social login (Google, Apple, Facebook)
{"provider": "google", "token": "id_token_here", "name": "John"}
GET/api/auth/me Auth Required
Get current user profile, plan, limits, and subscription

AI Chat / Analysis

POST/chat Auth Required
Send a message to MAI AI. Supports text + image upload. Returns streaming response.
Content-Type: multipart/form-data
Fields: message (text), image (file, optional), session_id (optional)

Health Features

GET/api/health-score Auth Required
Get personal Health Score (0-100) based on blood test history
GET/api/health-passport Auth Required (PRO)
Export full health data as JSON (PRO plan required)
GET/api/health-tip Public
Get today's health tip (changes daily)
GET/api/seasonal-alerts Public
Get current month's seasonal health recommendations

Gamification

GET/api/achievements Auth Required
Get all achievements with earned/locked status and total points
GET/api/bingo/card Auth Required
Get current month's Blood Test Bingo card

Social & Community

GET/api/referral/stats Auth Required
Get referral code and statistics
POST/api/reviews Auth Required
Submit a review (1-5 stars + text)
{"rating": 5, "text": "Great AI medical tool!"}
GET/api/reviews Public
Get approved public reviews

A/B Testing

GET/api/ab/assign Public
Get A/B test variant assignments for current visitor
POST/api/ab/event Public
Track A/B test events (view, click, convert)
{"experiment": "cta_color", "variant": "gold", "event_type": "click"}

Integrations

POST/api/corporate/inquiry Public
Submit a corporate/B2B inquiry
POST/api/influencer/apply Public
Apply for influencer/affiliate program
POST/api/email/subscribe Public
Subscribe to newsletter
{"email": "user@example.com", "name": "John", "language": "en"}

Rate Limits

Free plan: 5 AI queries/day, 3 image uploads/day

Basic plan: 30 AI queries/day, 15 image uploads/day

PRO plan: Unlimited queries and uploads

API rate limit: 60 requests/minute per IP for public endpoints

Need Custom Integration?

Contact us for white-label API access, custom endpoints, and enterprise support.

Contact Sales →