Skip to main content

Chat completions

POST /users/{user_id}/chat/completions creates a user-scoped completion with ONVY context injection. Request body highlights:
  • messages
  • model
  • temperature
  • max_tokens
  • stream
  • exclude_context
exclude_context lets you suppress parts of ONVY enrichment, for example knowledge, scores, workouts, facts, or all.

AI summaries

GET /users/{user_id}/ai/summaries and POST /users/{user_id}/ai/summaries manage persisted AI summaries. The current public create contract supports:
  • type: "meal"
This lets you submit meal input and retrieve the generated summary later through the normal list and detail routes.

Operational model

  • AI outputs are persisted with metadata for auditability
  • Summary generation can emit webhook events such as ai_summaries:created
  • Chat and summary flows reuse the same user-level health context rather than requiring you to rebuild prompts from raw records
Start with standard data ingestion and user creation first. AI endpoints are more useful once facts, daily_records, and activity history already exist for the user.