Thrive AI Health
Api reference

AI-generated insights for a metric over a time range

`metric` is either a domain (`activity`, `sleep`, `body`, `vitals`) or a known per-metric slug (e.g. `heart_rate`, `steps`, `glucose`, `weight`). Per-metric slugs route to the domain that produces the relevant factoid — so `heart_rate` pulls from the sleep generator (which surfaces resting HR), `steps` from activity, `glucose` from vitals. The narrative describes the domain, but `key_findings` is filtered to the requested metric. `time_range` selects the analysis window; `language` is a BCP-47 code (default `en`).

GET
/v1/users/{user_id}/metrics/{metric}/insights

Authorization

MemberBearer
AuthorizationBearer <token>

Member-scoped JWT minted by POST /v1/auth/token. Required on every /v1/users/{user_id}/... route; the token's sub claim must match the path user_id.

In: header

Path Parameters

user_id*User Id
Formatuuid
metric*Metric

Query Parameters

time_range?Time Range
Default"month"
Value in"week" | "month" | "quarter" | "year"
language?Language
Default"en"

Header Parameters

org-id?string|null
x-user-id?string|null
x-request-id?string|null
traceparent?string|null
Idempotency-Key?|null

Response Body

application/json

application/json

curl -X GET "https://loading/v1/users/497f6eca-6276-4993-bfeb-53cbbbba6f08/metrics/string/insights"
{
  "data": {
    "metric": "string",
    "time_range": "week",
    "headline": "string",
    "narrative": "string",
    "key_findings": [
      "string"
    ],
    "recommendations": [
      "string"
    ],
    "generated_at": "2019-08-24T14:15:22Z",
    "model_version": "string"
  }
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}