> ## 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.

# Detect a voice or text command

> Parses natural-language input (from voice or text) to detect presentation control commands such as navigation, audio control, and CTA actions. Rate-limited to 10 requests per minute per IP and presentation.



## OpenAPI

````yaml /openapi.json post /api/actions
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/actions:
    post:
      tags:
        - Actions
      summary: Detect a voice or text command
      description: >-
        Parses natural-language input (from voice or text) to detect
        presentation control commands such as navigation, audio control, and CTA
        actions. Rate-limited to 10 requests per minute per IP and presentation.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - input
              properties:
                input:
                  type: string
                  minLength: 1
                  maxLength: 500
                  description: Voice transcript or text input
                presentationId:
                  type: string
                  format: uuid
                context:
                  type: object
                  properties:
                    currentSlide:
                      type: integer
                      minimum: 1
                    totalSlides:
                      type: integer
                      minimum: 1
                    isPlaying:
                      type: boolean
                    volume:
                      type: number
                      minimum: 0
                      maximum: 100
                    awaitingResume:
                      type: boolean
                    didNavigateToNewSlide:
                      type: boolean
      responses:
        '200':
          description: Detection result
          content:
            application/json:
              schema:
                oneOf:
                  - type: object
                    description: Action detected
                    properties:
                      type:
                        type: string
                        enum:
                          - action
                      action:
                        type: object
                        properties:
                          category:
                            type: string
                            enum:
                              - navigation
                              - audio
                              - cta
                              - continuation
                          action:
                            type: string
                            description: >-
                              Specific action (e.g. next, pause, open_cta,
                              resume_here)
                          slideNumber:
                            type: integer
                            description: Target slide (for goto action)
                          step:
                            type: integer
                            description: Volume step (for volume_up/down)
                          value:
                            type: integer
                            description: Volume value (for set_volume)
                      confidence:
                        type: number
                  - type: object
                    description: No action detected
                    properties:
                      type:
                        type: string
                        enum:
                          - no_action
                      rateLimited:
                        type: boolean
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: Rate limit exceeded
          content:
            application/json:
              schema:
                type: object
                properties:
                  type:
                    type: string
                  rateLimited:
                    type: boolean
components:
  schemas:
    Error:
      type: object
      properties:
        error:
          type: string
      required:
        - error

````