For the complete documentation index, see llms.txt. This page is also available as Markdown.

M42

List Patient Topology

get

Patient-level UMAP coordinates + predicted risk for the Self-Image scatter. Hand-seeded demo data (no ML training). Paginated.

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
workspace_idstring · uuidRequired
Query parameters
clusterstring · min: 1 · max: 64 · nullableOptional
risk_tierinteger · max: 4 · nullableOptional
limitinteger · min: 1 · max: 50000OptionalDefault: 10000
offsetintegerOptionalDefault: 0
Responses
200

Successful Response

application/json
workspace_idstring · uuidRequired
countintegerRequired
get/v1/{workspace_id}/m42/patient-topology
GET /v1/{workspace_id}/m42/patient-topology HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "workspace_id": "123e4567-e89b-12d3-a456-426614174000",
  "count": 1,
  "items": [
    {
      "workspace_id": "123e4567-e89b-12d3-a456-426614174000",
      "patient_id": "text",
      "umap_x": 1,
      "umap_y": 1,
      "pca_x": 1,
      "pca_y": 1,
      "pca_z": 1,
      "cluster_name": "text",
      "age_bucket": "text",
      "gender": "text",
      "nationality": "text",
      "district": "text",
      "charlson_cci": 1,
      "bmi_latest": 1,
      "hba1c_latest": 1,
      "risk_tier": 1,
      "y_hat_t2d_1yr": 1,
      "y_hat_htn_1yr": 1,
      "y_hat_chf_90d": 1,
      "y_hat_asthma_12mo": 1,
      "y_hat_ckd_1yr": 1,
      "y_hat_copd_12mo": 1,
      "y_hat_composite": 1,
      "emergence_month": 1
    }
  ]
}

List Forecast Fan

get

Forecast fan points (t, median, lower/upper 95% CI) for a named run + scenario. Used by the Sensorium observational fan and the Sims dual-envelope overlay.

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
workspace_idstring · uuidRequired
Query parameters
run_idstring · min: 1 · max: 128 · nullableOptional
scenariostring · enum · nullableOptionalPossible values:
limitinteger · min: 1 · max: 5000OptionalDefault: 1000
offsetintegerOptionalDefault: 0
Responses
200

Successful Response

application/json
workspace_idstring · uuidRequired
countintegerRequired
get/v1/{workspace_id}/m42/forecast-fan
GET /v1/{workspace_id}/m42/forecast-fan HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "workspace_id": "123e4567-e89b-12d3-a456-426614174000",
  "count": 1,
  "items": [
    {
      "workspace_id": "123e4567-e89b-12d3-a456-426614174000",
      "run_id": "text",
      "scenario": "baseline",
      "t": 1,
      "lower_95": 1,
      "upper_95": 1,
      "median": 1,
      "observed": 1,
      "ym": "text",
      "is_historical": true
    }
  ]
}

List Anomalies Ranked

get

Ranked anomalies for a single indicator (default t2d_risk). Includes inline decomposition + district centroids for the map. Schema-probes the alerts table so it works pre- and post-multi-indicator pipeline expansion.

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
workspace_idstring · uuidRequired
Query parameters
indicatorstring · min: 1 · max: 32 · nullableOptional
limitinteger · min: 1 · max: 500OptionalDefault: 50
offsetintegerOptionalDefault: 0
Responses
200

Successful Response

application/json
workspace_idstring · uuidRequired
countintegerRequired
get/v1/{workspace_id}/m42/anomalies/ranked
GET /v1/{workspace_id}/m42/anomalies/ranked HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "workspace_id": "123e4567-e89b-12d3-a456-426614174000",
  "count": 1,
  "items": [
    {
      "indicator": "t2d_risk",
      "district_name": "text",
      "lat": 1,
      "lon": 1,
      "rate_per_1k": 0,
      "territory_mean": 0,
      "residual": 0,
      "cohort_size": 0,
      "is_anomaly": true,
      "alert_id": "text",
      "severity": "text",
      "priority_score": 0,
      "impact": 0,
      "narrative": "text",
      "decomposition": [
        {
          "feature_name": "text",
          "beta": 1,
          "delta_x": 1,
          "contribution": 1,
          "family": "text",
          "ci_lo": 1,
          "ci_hi": 1
        }
      ]
    }
  ]
}

List Cluster Summary

get

Per-cluster cohort stats — size, mean age/BMI/HbA1c, prediabetes / T2D %, predicted-risk mean. Powers the Patient Profile cluster strip.

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
workspace_idstring · uuidRequired
Query parameters
limitinteger · min: 1 · max: 500OptionalDefault: 50
offsetintegerOptionalDefault: 0
Responses
200

Successful Response

application/json
workspace_idstring · uuidRequired
countintegerRequired
get/v1/{workspace_id}/m42/clusters/summary
GET /v1/{workspace_id}/m42/clusters/summary HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "workspace_id": "123e4567-e89b-12d3-a456-426614174000",
  "count": 1,
  "items": [
    {
      "cluster_name": "text",
      "cohort_size": 1,
      "mean_age": 1,
      "mean_bmi": 1,
      "mean_hba1c": 1,
      "pct_male": 1,
      "pct_prediabetes": 1,
      "pct_t2d": 1,
      "mean_y_hat": 1
    }
  ]
}

List Cluster Forecast

get

Per-cluster forecast fan points for the Patient Profile multi-line chart. focus_area defaults to T2D for backward compat.

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
workspace_idstring · uuidRequired
Query parameters
focus_areastring · min: 1 · max: 32 · nullableOptional
limitinteger · min: 1 · max: 5000OptionalDefault: 1000
offsetintegerOptionalDefault: 0
Responses
200

Successful Response

application/json
workspace_idstring · uuidRequired
countintegerRequired
get/v1/{workspace_id}/m42/clusters/forecast
GET /v1/{workspace_id}/m42/clusters/forecast HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "workspace_id": "123e4567-e89b-12d3-a456-426614174000",
  "count": 1,
  "items": [
    {
      "workspace_id": "123e4567-e89b-12d3-a456-426614174000",
      "cluster_name": "text",
      "focus_area": "text",
      "t": 1,
      "median": 1,
      "lower_95": 1,
      "upper_95": 1,
      "observed": 1,
      "ym": "text",
      "is_historical": true
    }
  ]
}

List Forecast Draws

get

Sampled subset of raw Poisson bootstrap draws (faint spaghetti curves behind the forecast fan).

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
workspace_idstring · uuidRequired
Query parameters
run_idstring · min: 1 · max: 128OptionalDefault: observational-territory-t2d
scenariostring · min: 1 · max: 32OptionalDefault: baseline
sampleinteger · min: 1 · max: 100OptionalDefault: 20
Responses
200

Successful Response

application/json
workspace_idstring · uuidRequired
countintegerRequired
get/v1/{workspace_id}/m42/forecast-fan/draws
GET /v1/{workspace_id}/m42/forecast-fan/draws HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "workspace_id": "123e4567-e89b-12d3-a456-426614174000",
  "count": 1,
  "items": [
    {
      "draw_id": 1,
      "t": 1,
      "value": 1
    }
  ]
}

List Model Registry

get

Fitted GLM coefficients, training-set size, AUROC for each focus-area model. Inline JSON kept as strings — clients parse.

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
workspace_idstring · uuidRequired
Query parameters
limitinteger · min: 1 · max: 500OptionalDefault: 50
offsetintegerOptionalDefault: 0
Responses
200

Successful Response

application/json
workspace_idstring · uuidRequired
countintegerRequired
get/v1/{workspace_id}/m42/model-registry
GET /v1/{workspace_id}/m42/model-registry HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "workspace_id": "123e4567-e89b-12d3-a456-426614174000",
  "count": 1,
  "items": [
    {
      "workspace_id": "123e4567-e89b-12d3-a456-426614174000",
      "model_id": "text",
      "name": "text",
      "focus_area": "text",
      "algorithm": "text",
      "version": "text",
      "trained_at": "2026-01-01T00:00:00.000Z",
      "training_set_size": 1,
      "coefficients_json": "text",
      "metrics_json": "text",
      "status": "text"
    }
  ]
}

List Stratified Fits

get

Per-cohort x region GLM fits with pooled fallback. Drives the dashboard's outcome-by-segment comparison view.

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
workspace_idstring · uuidRequired
Query parameters
outcome_keystring · min: 1 · max: 64 · nullableOptional
limitinteger · min: 1 · max: 500OptionalDefault: 50
offsetintegerOptionalDefault: 0
Responses
200

Successful Response

application/json
workspace_idstring · uuidRequired
countintegerRequired
get/v1/{workspace_id}/m42/stratified-fits
GET /v1/{workspace_id}/m42/stratified-fits HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "workspace_id": "123e4567-e89b-12d3-a456-426614174000",
  "count": 1,
  "items": [
    {
      "workspace_id": "123e4567-e89b-12d3-a456-426614174000",
      "outcome_key": "text",
      "outcome_name": "text",
      "cohort": "text",
      "region": "text",
      "n": 1,
      "base_rate": 1,
      "auroc": 1,
      "intercept": 1,
      "coefficients_json": "text",
      "is_pooled_fallback": true
    }
  ]
}

List Patient Labs

get

Patient-level bronze lab rows ordered by observation_date. Drives the mini-trajectory charts in the Patient Profile drawer.

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
workspace_idstring · uuidRequired
patient_idstring · min: 1 · max: 64Required
Query parameters
limitinteger · min: 1 · max: 2000OptionalDefault: 500
offsetintegerOptionalDefault: 0
Responses
200

Successful Response

application/json
workspace_idstring · uuidRequired
countintegerRequired
get/v1/{workspace_id}/m42/patients/{patient_id}/labs
GET /v1/{workspace_id}/m42/patients/{patient_id}/labs HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "workspace_id": "123e4567-e89b-12d3-a456-426614174000",
  "count": 1,
  "items": [
    {
      "patient_id": "text",
      "observation_date": "text",
      "test_name": "text",
      "value": 1,
      "units": "text",
      "loinc_code": "text"
    }
  ]
}

Get Patient Note

get

Patient's synthetic clinical note + LLM-extracted structured fields. NLP sample is 500 patients — returns 404 outside that set.

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
workspace_idstring · uuidRequired
patient_idstring · min: 1 · max: 64Required
Responses
200

Successful Response

application/json
workspace_idstring · uuidRequired
patient_idstringRequired
authored_atstring · date-time · nullableOptional
authorstring · nullableOptional
note_textstringRequired
get/v1/{workspace_id}/m42/patients/{patient_id}/note
GET /v1/{workspace_id}/m42/patients/{patient_id}/note HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "workspace_id": "123e4567-e89b-12d3-a456-426614174000",
  "patient_id": "text",
  "authored_at": "2026-01-01T00:00:00.000Z",
  "author": "text",
  "note_text": "text",
  "extractions": {
    "symptoms": [
      "text"
    ],
    "concerns": [
      "text"
    ],
    "medications_planned": [
      "text"
    ],
    "hba1c_sentiment": "text",
    "activity_level": "text",
    "smoking_status": "text",
    "food_pattern": "text",
    "n_symptoms": 0,
    "n_concerns": 0
  }
}

Get Notes Rollup

get

Cohort-wide (or per-cluster / per-district) rollup of NLP extractions joined onto patient-topology risk. Surfaces which narrative signals correlate with higher predicted T2D risk.

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
workspace_idstring · uuidRequired
Query parameters
clusterstring · min: 1 · max: 64 · nullableOptional
districtstring · min: 1 · max: 64 · nullableOptional
Responses
200

Successful Response

application/json
workspace_idstring · uuidRequired
total_notesintegerRequired
cohort_mean_risknumberRequired
get/v1/{workspace_id}/m42/notes/rollup
GET /v1/{workspace_id}/m42/notes/rollup HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
{
  "workspace_id": "123e4567-e89b-12d3-a456-426614174000",
  "total_notes": 1,
  "cohort_mean_risk": 1,
  "sentiment_distribution": [
    {
      "value": "text",
      "n": 1,
      "pct": 1,
      "mean_risk": 1,
      "risk_lift": 1
    }
  ],
  "top_symptoms": [
    {
      "value": "text",
      "n": 1,
      "pct": 1,
      "mean_risk": 1,
      "risk_lift": 1
    }
  ],
  "top_concerns": [
    {
      "value": "text",
      "n": 1,
      "pct": 1,
      "mean_risk": 1,
      "risk_lift": 1
    }
  ],
  "top_medications": [
    {
      "value": "text",
      "n": 1,
      "pct": 1,
      "mean_risk": 1,
      "risk_lift": 1
    }
  ],
  "sdoh": {
    "activity": [
      {
        "value": "text",
        "n": 1,
        "pct": 1,
        "mean_risk": 1,
        "risk_lift": 1
      }
    ],
    "smoking": [
      {
        "value": "text",
        "n": 1,
        "pct": 1,
        "mean_risk": 1,
        "risk_lift": 1
      }
    ],
    "diet": [
      {
        "value": "text",
        "n": 1,
        "pct": 1,
        "mean_risk": 1,
        "risk_lift": 1
      }
    ]
  }
}

List Catalog

get

Per-table layer + description + row count for the Catalog page.

Authorizations
AuthorizationstringRequired

API key issued via POST /v1/{workspace_id}/api-keys. Pass the returned api_key value as a Bearer token.

Path parameters
workspace_idstring · uuidRequired
Responses
200

Successful Response

application/json
workspace_idstring · uuidRequired
countintegerRequired
get/v1/{workspace_id}/m42/catalog
GET /v1/{workspace_id}/m42/catalog HTTP/1.1
Host: api.platform.amigo.ai
Authorization: Bearer YOUR_SECRET_TOKEN
Accept: */*
200

Successful Response

{
  "workspace_id": "123e4567-e89b-12d3-a456-426614174000",
  "count": 1,
  "items": [
    {
      "name": "text",
      "layer": "text",
      "description": "text",
      "row_count": 1,
      "exists": true
    }
  ]
}

Last updated

Was this helpful?