> ## Documentation Index
> Fetch the complete documentation index at: https://developer.demand-iq.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Classify viewer intent after Q&A

> Uses AI (with regex fallback) to classify a viewer's natural-language response during a Q&A pause. Returns whether the viewer wants to continue the presentation, go back to the previous slide, or ask another question.

When the viewer was navigated to a different slide to answer a question, the classification includes a `go_back` option so they can return to where they were.



## OpenAPI

````yaml /openapi.json post /api/intent/continue
openapi: 3.0.0
info:
  title: AI Presentations API
  version: 1.0.0
  description: >-
    REST API for AI Presentations — an AI-powered presentation platform with
    narrated slides, live Q&A, and deck management.


    **Authentication**: Most endpoints require a session cookie obtained from
    `POST /api/auth/login`. Presentation playback endpoints (`/api/qa`,
    `/api/narration/*`) also accept a `presentationId` for unauthenticated
    viewer access.
  contact:
    name: Demand IQ
    url: https://demand-iq.com
servers:
  - url: https://app.demand-iq.com
    description: Production
  - url: http://localhost:3000
    description: Local development
security: []
tags:
  - name: Decks
    description: Manage presentation decks
  - name: Slides
    description: Manage slides within a deck
  - name: FAQs
    description: Manage pre-built Q&A pairs
  - name: Branding
    description: Colors, logo, and call-to-action configuration
  - name: Q&A
    description: Live question answering and Q&A settings
  - name: Narration
    description: Text-to-speech synthesis
  - name: Presentations
    description: Create and manage personalized presentation instances
  - name: Generation
    description: AI-powered content generation from slide images
  - name: Images
    description: Image upload and management
  - name: Voices
    description: Available TTS voices
  - name: Utility
    description: Health check and diagnostics
  - name: Authentication
    description: Session-based login, logout, and identity
  - name: Company
    description: Organization contact info and knowledge base
  - name: Notifications
    description: Event subscriptions and delivery log
  - name: Contracts
    description: Contract template import and e-signature
  - name: Fonts
    description: Available Google Fonts for branding
  - name: Roof Measurements
    description: Request and track automated roof measurements
  - name: Actions
    description: Voice/text command detection for presentation control
  - name: Appointments
    description: Appointment scheduling for presentation viewers
  - name: Activity
    description: Recent presentation activity feed
  - name: Onboarding
    description: >-
      Per-user product onboarding milestones (ENG-641). Milestone endpoints are
      idempotent and are called by the app UI — they should not be treated as
      tenant-integration surface.
paths:
  /api/intent/continue:
    post:
      tags:
        - Q&A
      summary: Classify viewer intent after Q&A
      description: >-
        Uses AI (with regex fallback) to classify a viewer's natural-language
        response during a Q&A pause. Returns whether the viewer wants to
        continue the presentation, go back to the previous slide, or ask another
        question.


        When the viewer was navigated to a different slide to answer a question,
        the classification includes a `go_back` option so they can return to
        where they were.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - userResponse
                - promptText
              properties:
                userResponse:
                  type: string
                  minLength: 1
                  description: The viewer's spoken or typed response
                promptText:
                  type: string
                  minLength: 1
                  description: >-
                    The prompt that was shown to the viewer (e.g. "Would you
                    like to continue?")
                didNavigateToNewSlide:
                  type: boolean
                  default: false
                  description: >-
                    Whether the viewer was navigated to a different slide to
                    answer their question
                currentSlideTitle:
                  type: string
                  description: >-
                    Title of the slide currently displayed (used for context
                    when classifying)
      responses:
        '200':
          description: Classification result
          content:
            application/json:
              schema:
                type: object
                properties:
                  intent:
                    type: string
                    enum:
                      - continue
                      - go_back
                      - question
                    description: >-
                      `continue` — resume the presentation from the current
                      slide. `go_back` — return to the slide before the Q&A
                      detour (only when `didNavigateToNewSlide` is true).
                      `question` — the viewer has a new question.
                  shouldContinue:
                    type: boolean
                    description: >-
                      `true` when intent is `continue` or `go_back`, `false`
                      when `question`
                required:
                  - intent
                  - shouldContinue
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
      required:
        - error

````