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/v1All 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/chatsOption 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/chatsEndpoints
Authentication
/auth/login
Exchange email + password for a JWT access token.
/auth/forgot-password
Request a password-reset link via email.
/auth/reset-password
Reset password using a token from the reset email.
Analysis
/analyse
Run a veterinary AI analysis (completion, reasoning, or behavioral). Consumes 1 quota.
Consultations (Chats)
/chats
List your consultation history with pagination.
/chats/{chat_id}
Get a single consultation with all messages.
/chats/{chat_id}
Delete a consultation and all its messages.
API Keys
/platform/api-keys
List your active API keys.
/platform/api-keys
Create a new API key. The full key is only returned once.
/platform/api-keys/{key_id}
Revoke an API key immediately.
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
| Tier | Daily quota | Rate limit |
|---|---|---|
| Free | 20 analyses/day | 5 req/min on /analyse |
| Pro | 500 analyses/day | 5 req/min on /analyse |
| Enterprise | Unlimited | Custom |
Quotas reset daily at midnight UTC. Exceeding rate limits returns HTTP 429.
Error codes
400Bad request — malformed JSON or missing required field
401Unauthorized — missing or expired token / API key
403Forbidden — account inactive or insufficient permissions
404Not found — resource does not exist or you don't own it
422Validation error — input_data failed model-type schema check
429Rate limited or daily quota exhausted
500Internal server error — analysis pipeline failure
All errors return { "detail": "..." } in the response body.