Technical reference for the InvisibleSignal platform APIs
Risk scoring via the deterministic weighted index (four published weights, no learned parameters). Accepts symptoms, location, and demographic inputs and returns per-condition risk scores with intervals.
| Name | Type | Required | Description |
|---|---|---|---|
symptoms | string | required | Comma-separated symptom list (e.g. fatigue,joint_pain,brain_fog) |
state | string | optional | Two-letter state FIPS or abbreviation for geographic risk weighting |
age | number | optional | Patient age for demographic risk adjustment |
sex | string | optional | Biological sex (male | female) for prevalence weighting |
month | number | optional | Month (1-12) for seasonal risk factor |
{
"predictions": [
{
"condition": "lyme_disease",
"risk_score": 0.82,
"confidence": [0.74, 0.89],
"severity": "high"
},
{
"condition": "long_covid",
"risk_score": 0.45,
"confidence": [0.38, 0.53],
"severity": "moderate"
}
],
"model_version": "xgb-v3.2",
"geo_rank_stability_spearman": 0.882,
"features_used": 10
}curl "https://invisiblesignal.com/api/predict?symptoms=fatigue,joint_pain,brain_fog&state=VA&age=35&month=6"
SignalBot AI chatbot powered by Anthropic Claude. Accepts a message and returns a streaming response with clinical NLP reasoning across 6 overlapping conditions.
| Name | Type | Required | Description |
|---|---|---|---|
message | string | required | User message or symptom description |
thread_id | string | optional | Conversation thread ID for context continuity |
mode | string | optional | Response mode: general | symptom_check | condition_info |
{
"id": "msg_01abc...",
"role": "assistant",
"content": "Based on the symptom pattern you described...",
"thread_id": "thr_xyz...",
"model": "claude-sonnet",
"usage": {
"input_tokens": 245,
"output_tokens": 512
}
}curl -X POST "https://invisiblesignal.com/api/chat" \
-H "Content-Type: application/json" \
--cookie "sb-access-token=..." \
-d '{"messages":[{"role":"user","content":"What are early Lyme symptoms?"}]}'Signals derived from CDC's published Lyme surveillance releases — incidence hotspots, threshold crossings, geography-vintage notes, case-accounting reconciliation, and the county-coding gaps that make a county figure unusable. Every signal carries its source dataset and what it does not establish. This is NOT a live feed: CDC publishes Lyme surveillance annually and there is no real-time federal tick-borne disease stream.
| Name | Type | Required | Description |
|---|---|---|---|
kind | string | optional | Filter by signal kind: hotspot | threshold | data-quality | geography | reconciliation |
limit | number | optional | Maximum signals to return (max 50) |
{
"provenance": {
"vintage": "2022–2023",
"cadence": "Annual. CDC publishes Lyme surveillance once a year.",
"isLiveFeed": false
},
"count": 16,
"signals": [{
"id": "data-quality-48",
"kind": "data-quality",
"severity": "high",
"headline": "Texas — 50 reported cases, none county-coded",
"source": "CDC dataset x5j9-wybp, 2022–2023",
"caveat": "Low county-coding completeness is a property of the reporting jurisdiction, not a measure of disease burden."
}]
}curl "https://invisiblesignal.theaicowboys.com/api/surveillance/signals?kind=data-quality"
Export platform datasets in CSV or JSON format. Supports surveillance data, symptom matrices, condition profiles, provider directories, and state-level statistics.
| Name | Type | Required | Description |
|---|---|---|---|
dataset | string | required | Dataset to export: surveillance | symptoms | conditions | providers | states |
format | string | optional | Output format: csv | json (default: csv) |
state | string | optional | Filter by state abbreviation |
year | number | optional | Filter by year (2018-2026) |
{
"dataset": "surveillance",
"format": "json",
"record_count": 12847,
"columns": ["state", "year", "condition", "cases", "rate_per_100k"],
"data": [
{
"state": "CT",
"year": 2024,
"condition": "lyme_disease",
"cases": 3241,
"rate_per_100k": 89.7
}
]
}curl "https://invisiblesignal.com/api/export?dataset=surveillance&format=json&state=CT"
Platform metadata and statistics. Returns model performance metrics, data source freshness, total records processed, and system health indicators.
| Name | Type | Required | Description |
|---|---|---|---|
section | string | optional | Specific section: model | data | system | all (default: all) |
{
"model": {
"version": "xgb-v3.2",
"geo_rank_stability_spearman": 0.882,
"counties_evaluated": 424,
"training_samples": 54000,
"features": 10
},
"data": {
"total_records": 847293,
"sources": 8,
"last_refresh": "2026-08-01T00:00:00Z",
"coverage_years": "2018-2026"
},
"system": {
"uptime": "99.97%",
"avg_response_ms": 42
}
}curl "https://invisiblesignal.com/api/stats?section=all"
Supabase authentication callback handler. Processes OAuth redirect tokens and establishes authenticated sessions. Used internally by the auth flow.
| Name | Type | Required | Description |
|---|---|---|---|
code | string | required | Authorization code from OAuth provider |
next | string | optional | Redirect path after authentication (default: /dashboard) |
{
"status": "authenticated",
"redirect": "/dashboard",
"session": {
"access_token": "eyJ...",
"expires_at": 1723075200
}
}curl -X POST "https://invisiblesignal.com/api/auth/callback" \
-H "Content-Type: application/json" \
-d '{"code": "abc123", "next": "/dashboard"}'Dynamic OpenGraph image generation for social media sharing. Produces 1200x630 PNG images with condition-specific branding and statistics for link previews.
| Name | Type | Required | Description |
|---|---|---|---|
title | string | optional | Custom title text for the OG image |
condition | string | optional | Condition slug for themed branding |
stat | string | optional | Key statistic to display on the image |
Binary PNG image (1200x630) Content-Type: image/png
curl "https://invisiblesignal.com/api/og?title=Lyme%20Disease%20Risk&condition=lyme&stat=36M%20affected" -o og.png
+-------------------+ +-------------------+ +-------------------+
| | | | | |
| Next.js 16 | | API Routes | | Supabase |
| React 19 Client +------>+ /api/* +------>+ PostgreSQL |
| Tailwind CSS 4 | | | | PostGIS |
| | | - predict | | pgvector |
+-------------------+ | - chat | | |
| - surveillance | +-------------------+
| - export | ^
| - stats | |
| - auth/callback | +-------+-------+
| - og | | |
+--------+----------+ | Risk index |
| | rho=0.882 |
v | |
+-------------------+ +---------------+
| | ^
| Anthropic Claude | |
| (SignalBot) | +-------+-------+
| AI SDK v6 | | |
| Streaming SSE | | SIMD Engine |
| | | Morton Index |
+-------------------+ | BLAS Search |
| |
+---------------+
Authentication
Public endpoints (/api/stats, /api/data, /api/export) serve aggregate federal datasets and require no authentication. Protected endpoints (/api/chat, /api/predict, /api/v2/*) require a signed-in Supabase session cookie.
Rate Limits
Chat: 20 requests/minute per user. Predict and ML proxy: 60 requests/minute per user. Limits are enforced in the App Router (best-effort on serverless).
CORS & Security
Pages send Content-Security-Policy, HSTS, X-Frame-Options, and nosniff. The ML service is not exposed to the browser; same-origin /api/v2 injects a server-only API key.
Data Privacy
Federal datasets returned by /api/data and /api/export are aggregates. Chat and screening payloads are account-scoped when you are signed in and must not be posted anonymously.