Developers
QuantBayes API
External agents can use the same evidence model as the browser: projects, profiles, cases, evidence cells, runs, and saved results.
Agent workflow
| Step | Action | Meaning |
|---|---|---|
| 1 | Create a key | Open Account, create an API key, and copy it once. |
| 2 | Choose profile | Use /api/v1/profiles to select the correct evidence profile. |
| 3 | Create project | Use /api/v1/projects for the study, agent task, benchmark, or analysis context. |
| 4 | Create case | Use /api/v1/cases for the evidence-bearing unit of work. |
| 5 | Write evidence | Use /api/v1/evidence to store items and TRUE, FALSE, NA evidence cells. |
| 6 | Run QuantBayes | Use /api/v1/runs to freeze the case, profile, matrix, and result. |
| 7 | Review result | Open the returned run_uid in /studio/runs/[runUid]. |
Endpoints
| Method | Path | Auth | Purpose |
|---|---|---|---|
| GET | /api/v1/projects | Bearer API key | List projects for the authenticated account. |
| POST | /api/v1/projects | Bearer API key | Create or upsert a project. |
| GET | /api/v1/profiles | Bearer API key | List visible public, community, and private profiles. |
| GET | /api/v1/cases | Bearer API key | List cases, optionally filtered by project_id. |
| POST | /api/v1/cases | Bearer API key | Create or upsert a case. |
| POST | /api/v1/evidence | Bearer API key | Write case items, raw TRUE/FALSE/NA evidence, and QEM matrix cells. |
| GET | /api/v1/runs | Bearer API key | List saved QuantBayes runs. |
| POST | /api/v1/runs | Bearer API key | Run QuantBayes from the stored case evidence and profile. |
| GET | /api/v1/usage | Browser session | Show account usage, keys, and monthly totals in the UI. |
Minimal example
export QB_API_KEY="qb_your_key_here"
export QB_BASE_URL="http://localhost:3000"
curl -s "$QB_BASE_URL/api/v1/profiles" \
-H "Authorization: Bearer $QB_API_KEY"
curl -s "$QB_BASE_URL/api/v1/projects" \
-H "Authorization: Bearer $QB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "AI evidence verification demo",
"domain": "general",
"description": "Evidence-backed agent task"
}'
curl -s "$QB_BASE_URL/api/v1/runs" \
-H "Authorization: Bearer $QB_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"case_uid": "demo_case_001",
"profile_uid": "clinical_genetics_qem_demo"
}'