Skip to main content
POST
/
users
/
{user_id}
/
ai
/
summaries
curl --request POST \
  --url https://production.api.onvy.health/users/{user_id}/ai/summaries \
  --header 'Content-Type: application/json' \
  --header 'X-API-Key: <api-key>' \
  --data '
{
  "type": "meal",
  "data": {
    "description": "Grilled chicken breast with quinoa and steamed broccoli",
    "meal_time": "2024-10-28T12:00:00Z",
    "portion_multiplier": 1.5,
    "comment": "Homemade healthy lunch"
  }
}
'
{
  "id": "<string>",
  "name": "WorkoutSummary",
  "user_id": "<string>",
  "project_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "period": {
    "type": "activity",
    "id": "<string>",
    "start": "2023-11-07T05:31:56Z",
    "end": "2023-11-07T05:31:56Z",
    "duration_seconds": 123
  },
  "data": {},
  "llm_output": {
    "language": "<string>",
    "title": "<string>",
    "text": "<string>",
    "followup_questions": [
      "<string>"
    ]
  },
  "providers": [
    "GARMIN"
  ],
  "is_custom": true,
  "ref": "<string>",
  "knowledge_urls": [
    {
      "title": "<string>",
      "url": "<string>"
    }
  ],
  "user_comment": "<string>",
  "user_rating": -1,
  "llm_debug": {
    "model": "<string>",
    "prompt_id": "<string>",
    "org_prompt_id": "<string>"
  }
}

Authorizations

X-API-Key
string
header
required

API key for authentication

Path Parameters

user_id
string
required

User ID (e.g., google_104940819145861640201)

Body

application/json

AI summary creation data

type
enum<string>
required

Type of AI summary to create. Currently only 'meal' is supported.

Available options:
meal
data
MealInput · object
required

Input data for the AI summary, structure depends on the type

Response

AI summary created successfully

id
string
required

Unique summary identifier

name
enum<string>
required
Available options:
WorkoutSummary,
MindfulsessionSummary,
MealSummary,
SleepSummary,
DailySummary,
WeeklySummary,
TrendSummary,
ImpactSummary,
WeeklyActivitySummary,
DailyNutritionSummary,
WeeklyNutritionSummary
user_id
string
required
project_id
string
required
created_at
string<date-time>
required
updated_at
string<date-time>
required
period
object
required
data
object
required

Additional metrics specific to summary type

llm_output
object
required
providers
enum<string>[]
Available options:
GARMIN,
APPLE,
OURA,
FITBIT,
WHOOP
is_custom
boolean

If provided by customer POST

ref
string

Optional reference to original data

knowledge_urls
object[]
user_comment
string | null
user_rating
enum<integer>

-1 = bad, 0 = no rating, 1 = good

Available options:
-1,
0,
1
llm_debug
object