AI APIs

AI-powered endpoints for veterinary data analysis and insights.

POST /api/v1/ai/visit-summary

Generate comprehensive visit summaries from patient history data.

Authentication Requires X-API-Key header. For developer API keys, include clinicId in request body.
Request Example
{
  "payload": [
    {
      "BranchName": "Main Branch",
      "Date": "11/6/2025 11:59",
      "Session": { /* visit data */ },
      "Vaccine": { /* vaccine data */ }
    }
  ],
  "clinicId": "your-clinic-id",
  "options": {}
}
Response Example
{
  "success": true,
  "data": {
    "petId": "pet123",
    "petName": "Buddy",
    "summary": "Comprehensive visit summary...",
    "artifact": {
      "artifactId": "art123",
      "status": "completed",
      "model": "claude-3-5-sonnet"
    }
  }
}
POST /api/v1/ai/smart-snapshot

Get a complete patient overview with key findings, active concerns, and upcoming vaccinations.

Authentication Requires X-API-Key header. For developer API keys, include clinicId in request body.
Request Example
{
  "payload": [{ "BranchName": "Main Branch", "Date": "11/6/2025", "Session": {}, "Vaccine": {} }],
  "clinicId": "your-clinic-id",
  "options": {}
}
POST /api/v1/ai/message-draft

Generate professional message drafts for clients with customizable tone and context.

Authentication Requires X-API-Key header. For developer API keys, include clinicId in request body.
Request Example
{
  "payload": [{ "Date": "11/6/2025", "Session": {}, "Vaccine": {} }],
  "clinicId": "your-clinic-id",
  "options": { "messageType": "follow-up", "tone": "professional" }
}
POST /api/v1/ai/alerts

Detect patterns and generate alerts for missing vaccinations, incomplete treatments, and follow-ups.

Authentication Requires X-API-Key header. For developer API keys, include clinicId in request body.
Response Example
{
  "success": true,
  "data": {
    "alerts": [
      { "type": "missing_vaccination", "severity": "high", "message": "Rabies vaccination is overdue" }
    ]
  }
}
POST /api/v1/ai/analytics

Generate trends, insights, and analytics from visit and vaccination data over time.

Authentication Requires X-API-Key header. For developer API keys, include clinicId in request body.
POST /api/v1/ai/image-analysis

Analyze veterinary images (X-rays, skin conditions, wounds, etc.) using AI vision models. Optionally include pet history for context-aware analysis.

Authentication Requires X-API-Key header. For developer API keys, include clinicId in request body.
Request (multipart/form-data)
Form Data:
- images: [file1.jpg, file2.jpg] (up to 5 files)
- context: {"petId": "pet123", "visitDate": "2025-01-27"}
- imageType: "xray" | "skin" | "wound" | "general"
- clinicId: "your-clinic-id"
- petHistory: [] (optional)

Vet Recommendations APIs

AI-powered veterinary recommendations based on symptoms and case history.

POST /api/vet/recommendations

Get AI-powered veterinary recommendations based on symptoms and similar case history.

Authentication Requires X-API-Key header.
Request Example
{
  "symptoms": "Dog showing signs of lethargy, loss of appetite, and vomiting for 2 days",
  "quality": "premium",
  "language": "en"
}
Response Example
{
  "success": true,
  "recommendations": "Based on the symptoms described...",
  "qualityTier": "premium",
  "model": "claude-3-5-sonnet",
  "similarCasesFound": 3
}
POST /api/vet/pet-history-chat

Chat with AI about a pet's medical history. Supports file uploads (images, PDFs).

Authentication Requires X-API-Key header. For developer API keys, include clinicId in request body.
Request (multipart/form-data)
Form Data:
- petHistory: [{ ... }] (JSON string)
- messages: [{"role": "user", "content": "What vaccines does this pet need?"}]
- quality: "premium" (optional)
- language: "en" (optional)
- files: [file1.jpg, file2.pdf] (optional, up to 5 files)
- clinicId: "your-clinic-id"

Trial & Subscription APIs

Manage trials and subscriptions for vet recommendations API.

POST /api/vet/trial/recommendations

Get recommendations using trial credits (counts against trial limit).

Authentication Requires Authorization: Bearer {token} header (developer authentication).
Response Example
{
  "success": true,
  "recommendations": "Based on the symptoms...",
  "trialsRemaining": 7,
  "trialsUsed": 3,
  "trialsLimit": 10
}
GET /api/vet/subscription/status

Get current subscription status and usage for the authenticated developer.

Authentication Requires Authorization: Bearer {token} header (developer authentication).
Response Example
{
  "success": true,
  "subscription": {
    "hasSubscription": true,
    "plan": "professional",
    "callsUsed": 2500,
    "callsLimit": 10000,
    "callsRemaining": 7500,
    "billingPeriodEnd": "2025-02-27T00:00:00Z"
  }
}