TrackerAIVeterinary Intelligence
API Reference

TrackerAI REST API

Integrate veterinary AI diagnostic intelligence directly into your applications. JSON in, structured clinical analysis out.

Base URL

https://tracker--trackerai-backend-fastapi-app.modal.run/api/v1

All endpoints are prefixed with /api/v1. Requests and responses use application/json.

Authentication

All authenticated endpoints require either a JWT bearer token (issued on login) or a long-lived API key. Obtain API keys from the API Keys dashboard.

Option 1 — Bearer token (session)

curl -H "Authorization: Bearer <your_jwt_token>" \
  https://tracker--trackerai-backend-fastapi-app.modal.run/api/v1/chats

Option 2 — API key (long-lived)

curl -H "X-API-Key: trai_sk_your_api_key_here" \
  https://tracker--trackerai-backend-fastapi-app.modal.run/api/v1/chats

Endpoints

Authentication

POST

/auth/login

Exchange email + password for a JWT access token.

POST

/auth/forgot-password

Request a password-reset link via email.

POST

/auth/reset-password

Reset password using a token from the reset email.

Analysis

POST

/analyse

Run a veterinary AI analysis (completion, reasoning, or behavioral). Consumes 1 quota.

Auth

Consultations (Chats)

GET

/chats

List your consultation history with pagination.

Auth
GET

/chats/{chat_id}

Get a single consultation with all messages.

Auth
DELETE

/chats/{chat_id}

Delete a consultation and all its messages.

Auth

API Keys

GET

/platform/api-keys

List your active API keys.

Auth
POST

/platform/api-keys

Create a new API key. The full key is only returned once.

Auth
DELETE

/platform/api-keys/{key_id}

Revoke an API key immediately.

Auth

Example request

Run a clinical completion analysis on a 3-year-old Border Collie:

curl -X POST "https://tracker--trackerai-backend-fastapi-app.modal.run/api/v1/analyse" \
  -H "X-API-Key: trai_sk_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "model_type": "completion",
    "input_data": {
      "species": "Dog",
      "breed": "Border Collie",
      "age": "3 years",
      "sex": "Female",
      "weight": "18 kg",
      "clinical_history": "Sudden onset lethargy, reduced appetite for 2 days. Owner reports pale mucous membranes and increased respiratory effort."
    }
  }'
{
  "chat_id": 42,
  "message_id": 107,
  "emergency_flag": true,
  "confidence_level": "high",
  "retry_count": 0,
  "model_fallback": false,
  "output": {
    "summary": "Acute onset pallor and increased respiratory effort in a 3-year-old Border Collie. Differential includes immune-mediated haemolytic anaemia (IMHA), internal haemorrhage, or acute toxic exposure. Requires immediate haematological workup.",
    "differentials": [
      { "diagnosis": "Immune-Mediated Haemolytic Anaemia", "likelihood": "high", "supporting_findings": ["Pale mucous membranes", "Lethargy", "Breed predisposition"] },
      { "diagnosis": "Internal Haemorrhage", "likelihood": "moderate", "supporting_findings": ["Acute onset", "Pallor", "Respiratory effort"] }
    ],
    "confidence_level": "high",
    "emergency_flag": true,
    "emergency_justification": "Pale mucous membranes with increased respiratory effort in an acute presentation suggests haemodynamic compromise — immediate veterinary assessment required.",
    "recommended_workup": ["PCV / Total solids", "Blood smear for spherocytes", "Saline agglutination test", "Coagulation panel", "Abdominal ultrasound"],
    "initial_management": ["Establish IV access", "Oxygen supplementation", "Immediate haematology", "Consider blood transfusion if PCV < 15%"],
    "prognosis": "Guarded to fair with prompt treatment. IMHA carries 40–60% mortality without early immunosuppression.",
    "disclaimer": "This analysis supports — not replaces — clinical judgement."
  }
}

Rate limits & quotas

TierDaily quotaRate limit
Free20 analyses/day5 req/min on /analyse
Pro500 analyses/day5 req/min on /analyse
EnterpriseUnlimitedCustom

Quotas reset daily at midnight UTC. Exceeding rate limits returns HTTP 429.

Error codes

400

Bad request — malformed JSON or missing required field

401

Unauthorized — missing or expired token / API key

403

Forbidden — account inactive or insufficient permissions

404

Not found — resource does not exist or you don't own it

422

Validation error — input_data failed model-type schema check

429

Rate limited or daily quota exhausted

500

Internal server error — analysis pipeline failure

All errors return { "detail": "..." } in the response body.