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

# Summarize survey responses

> AI summary of a survey's responses. Returns `status` `ok` with `summary` (plain text) and `data` (headline,
overview, sentiment, findings with verbatim quotes that carry the response `ticketId`, themes, actions),
`not-enough-data` below 3 responses, `rate-limited` within 60 seconds of the last attempt, or `failed`
shortly after a failed attempt. A stored summary is returned without calling the model; `refresh=true`
regenerates it (at most once per minute). `outdated` is true when responses arrived after it was generated.
Uses up to the 999 newest responses within a 30,000-token budget. Consumes AI credits; 402 when the
organisation is out of AI usage, 409 when generation fails and nothing is stored.



## OpenAPI

````yaml https://api.gleap.io/api-docs.json get /engagement/surveys/{surveyId}/responses/summarize
openapi: 3.0.0
info:
  title: gleap-server
  version: 14.0.0
  contact: {}
servers:
  - url: https://api.gleap.io/v3
security: []
paths:
  /engagement/surveys/{surveyId}/responses/summarize:
    get:
      tags:
        - Engagement Survey
      summary: Summarize survey responses
      description: >-
        AI summary of a survey's responses. Returns `status` `ok` with `summary`
        (plain text) and `data` (headline,

        overview, sentiment, findings with verbatim quotes that carry the
        response `ticketId`, themes, actions),

        `not-enough-data` below 3 responses, `rate-limited` within 60 seconds of
        the last attempt, or `failed`

        shortly after a failed attempt. A stored summary is returned without
        calling the model; `refresh=true`

        regenerates it (at most once per minute). `outdated` is true when
        responses arrived after it was generated.

        Uses up to the 999 newest responses within a 30,000-token budget.
        Consumes AI credits; 402 when the

        organisation is out of AI usage, 409 when generation fails and nothing
        is stored.
      operationId: SummarizeSurveyResponses
      parameters:
        - in: path
          name: surveyId
          required: true
          schema:
            type: string
        - in: header
          name: project
          required: true
          schema:
            type: string
        - in: query
          name: refresh
          required: false
          schema:
            type: boolean
      responses:
        '200':
          description: Ok
          content:
            application/json:
              schema: {}
      security:
        - jwt: []
components:
  securitySchemes:
    jwt:
      type: http
      scheme: bearer
      bearerFormat: JWT

````