> ## Documentation Index
> Fetch the complete documentation index at: https://docs.onvy.health/llms.txt
> Use this file to discover all available pages before exploring further.

# List AI summaries

> List AI-generated summaries for a user. Filter by `name` to scope
to a specific summary type (`MealSummary`, `WorkoutSummary`,
`MindfulsessionSummary`, `SleepSummary`, `DailySummary`,
`DailyNutritionSummary`, `WeeklySummary`, `WeeklyActivitySummary`,
`WeeklyNutritionSummary`, `TrendSummary`, `ImpactSummary`).

AI summaries are how ONVY exposes domain-specific insights such as
meal nutrition analysis, sleep insights, and weekly trends. Most
summary types are system-generated as the underlying data lands;
only `MealSummary` is also customer-creatable through `POST` on
this collection.




## OpenAPI

````yaml /api-reference/openapi.yaml get /users/{user_id}/ai/summaries
openapi: 3.1.0
info:
  title: ONVY Health API
  description: >-
    AI-powered holistic health services API with data merging and metrics
    calculation
  version: 1.0.0
  contact:
    name: ONVY Support
    email: support@onvy.health
    url: https://onvy.health
  license:
    name: Proprietary
    url: https://onvy.health/terms
servers:
  - url: https://api.onvy.health
    description: Public API
security:
  - bearerAuth: []
tags:
  - name: static
    description: Static configuration endpoints
  - name: users
    description: User management
  - name: baselines
    description: User baseline metrics
  - name: daily-records
    description: Daily health records
  - name: chat
    description: AI chat completions
  - name: facts
    description: User facts for individualization
  - name: activities
    description: User activities (workouts and mindfulness sessions)
  - name: ai-summaries
    description: |
      AI-generated summaries. This is how ONVY exposes domain-specific
      insights such as meal nutrition analysis, sleep insights, workouts,
      and daily, weekly, nutrition, trend, and impact analysis. Most
      summary types are system-generated; the public create surface
      currently accepts `type=meal`.
  - name: custom-records
    description: Custom records and types
  - name: meals
    description: Nutrition meal tracking
paths:
  /users/{user_id}/ai/summaries:
    get:
      tags:
        - ai-summaries
      summary: List AI summaries
      description: |
        List AI-generated summaries for a user. Filter by `name` to scope
        to a specific summary type (`MealSummary`, `WorkoutSummary`,
        `MindfulsessionSummary`, `SleepSummary`, `DailySummary`,
        `DailyNutritionSummary`, `WeeklySummary`, `WeeklyActivitySummary`,
        `WeeklyNutritionSummary`, `TrendSummary`, `ImpactSummary`).

        AI summaries are how ONVY exposes domain-specific insights such as
        meal nutrition analysis, sleep insights, and weekly trends. Most
        summary types are system-generated as the underlying data lands;
        only `MealSummary` is also customer-creatable through `POST` on
        this collection.
      operationId: listAISummaries
      parameters:
        - $ref: '#/components/parameters/UserIdParam'
        - $ref: '#/components/parameters/StartDateParam'
        - $ref: '#/components/parameters/EndDateParam'
        - $ref: '#/components/parameters/SummaryNameParam'
        - $ref: '#/components/parameters/PageParam'
        - $ref: '#/components/parameters/LimitParam'
      responses:
        '200':
          description: List of AI summaries
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AISummaryList'
        '500':
          $ref: '#/components/responses/InternalError'
components:
  parameters:
    UserIdParam:
      name: user_id
      in: path
      required: true
      description: User ID (e.g., google_104940819145861640201)
      schema:
        type: string
    StartDateParam:
      name: start
      in: query
      required: false
      description: Start date (YYYY-MM-DD)
      schema:
        type: string
        format: date
    EndDateParam:
      name: end
      in: query
      required: false
      description: End date (YYYY-MM-DD)
      schema:
        type: string
        format: date
    SummaryNameParam:
      name: name
      in: query
      required: false
      description: Filter by summary name
      schema:
        type: string
        enum:
          - WorkoutSummary
          - MindfulsessionSummary
          - MealSummary
          - SleepSummary
          - DailySummary
          - WeeklySummary
          - TrendSummary
          - ImpactSummary
          - WeeklyActivitySummary
          - DailyNutritionSummary
          - WeeklyNutritionSummary
    PageParam:
      name: page
      in: query
      required: false
      description: Page Key for pagination
      schema:
        type: string
    LimitParam:
      name: limit
      in: query
      required: false
      description: Number of items per page
      schema:
        type: integer
        minimum: 1
        maximum: 1000
        default: 100
  schemas:
    AISummaryList:
      title: AISummaryList
      type: object
      required:
        - summaries
        - pagination
      properties:
        summaries:
          type: array
          items:
            title: AISummary
            type: object
            required:
              - id
              - name
              - user_id
              - project_id
              - created_at
              - updated_at
              - period
              - data
              - llm_output
            properties:
              id:
                type: string
                description: Unique summary identifier
              name:
                type: string
                enum:
                  - WorkoutSummary
                  - MindfulsessionSummary
                  - MealSummary
                  - SleepSummary
                  - DailySummary
                  - WeeklySummary
                  - TrendSummary
                  - ImpactSummary
                  - WeeklyActivitySummary
                  - DailyNutritionSummary
                  - WeeklyNutritionSummary
              user_id:
                type: string
              project_id:
                type: string
              created_at:
                type: string
                format: date-time
              updated_at:
                type: string
                format: date-time
              providers:
                type: array
                items:
                  type: string
                  enum:
                    - GARMIN
                    - APPLE
                    - OURA
                    - FITBIT
                    - WHOOP
              is_custom:
                type: boolean
                description: If provided by customer POST
              ref:
                type: string
                description: Optional reference to original data
              period:
                type: object
                required:
                  - type
                  - id
                  - start
                  - end
                properties:
                  type:
                    type: string
                    enum:
                      - activity
                      - day
                      - week
                      - month
                      - quarter
                      - half-year
                      - year
                  id:
                    type: string
                    description: Period identifier (e.g., 2024-W43, 2024-10-21)
                  start:
                    type: string
                    format: date-time
                  end:
                    type: string
                    format: date-time
                  duration_seconds:
                    type: integer
                    description: Duration in seconds (for activity periods)
              data:
                type: object
                description: Additional metrics specific to summary type
              llm_output:
                type: object
                required:
                  - language
                  - title
                  - text
                properties:
                  language:
                    type: string
                    description: Language code (e.g., en, de)
                  title:
                    type: string
                    description: Generated title
                  text:
                    type: string
                    description: Generated summary text
                  followup_questions:
                    type: array
                    items:
                      type: string
              knowledge_urls:
                type: array
                items:
                  type: object
                  required:
                    - title
                    - url
                  properties:
                    title:
                      type: string
                    url:
                      type: string
                      format: uri
              user_comment:
                type:
                  - string
                  - 'null'
              user_rating:
                type: integer
                enum:
                  - -1
                  - 0
                  - 1
                description: '-1 = bad, 0 = no rating, 1 = good'
              llm_debug:
                type: object
                properties:
                  model:
                    type: string
                    description: Model used for generation
                  prompt_id:
                    type: string
                    description: Prompt template identifier
                  org_prompt_id:
                    type: string
                    description: Organization-specific prompt override
        pagination:
          type: object
          title: Pagination
          required:
            - limit
            - total
          properties:
            page:
              type: string
            limit:
              type: integer
              minimum: 1
              maximum: 1000
            total:
              type: integer
              minimum: 0
            next_page:
              type: string
    ValidationError:
      type: object
      title: ValidationError
      required:
        - error
      properties:
        error:
          type: string
          minLength: 1
      additionalProperties: false
  responses:
    InternalError:
      description: Internal server error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ValidationError'
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: OAuth bearer token for Health API authentication

````