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

# Import a presentation as a deck

> Imports a slide presentation and creates a fully persisted image-based deck from it. Each slide is rendered to a PNG image, and speaker notes become the editable narration script for that slide (the original notes are retained separately). The original source file and rendered slide images are stored alongside the deck and removed when the deck is deleted.

The `source` query parameter selects the import format. `pptx` (PowerPoint) is currently the only supported source. PowerPoint files are limited to 25 MB and 50 slides, and the request body as a whole is limited to 30 MB.

Imports are atomic: if any step fails, no deck or slides are created and any stored files are cleaned up. Non-fatal issues (for example, a slide that rendered with reduced fidelity) are reported in the `import.warnings` array of the response.



## OpenAPI

````yaml /openapi.json post /api/decks/import
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/decks/import:
    post:
      tags:
        - Decks
      summary: Import a presentation as a deck
      description: >-
        Imports a slide presentation and creates a fully persisted image-based
        deck from it. Each slide is rendered to a PNG image, and speaker notes
        become the editable narration script for that slide (the original notes
        are retained separately). The original source file and rendered slide
        images are stored alongside the deck and removed when the deck is
        deleted.


        The `source` query parameter selects the import format. `pptx`
        (PowerPoint) is currently the only supported source. PowerPoint files
        are limited to 25 MB and 50 slides, and the request body as a whole is
        limited to 30 MB.


        Imports are atomic: if any step fails, no deck or slides are created and
        any stored files are cleaned up. Non-fatal issues (for example, a slide
        that rendered with reduced fidelity) are reported in the
        `import.warnings` array of the response.
      parameters:
        - name: source
          in: query
          required: true
          schema:
            type: string
            enum:
              - pptx
          description: Slide import source format. Only `pptx` is currently supported.
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - name
                - file
              properties:
                name:
                  type: string
                  maxLength: 255
                  description: Name for the new deck.
                  example: Spring Roofing Pitch
                description:
                  type: string
                  maxLength: 10000
                  description: Optional deck description.
                file:
                  type: string
                  format: binary
                  description: >-
                    The presentation file. For `source=pptx`, exactly one
                    `.pptx` file up to 25 MB with at most 50 slides.
      responses:
        '201':
          description: Deck created from the imported presentation
          content:
            application/json:
              schema:
                type: object
                required:
                  - deck
                  - import
                properties:
                  deck:
                    $ref: '#/components/schemas/Deck'
                  import:
                    type: object
                    required:
                      - id
                      - source
                      - status
                      - warnings
                    properties:
                      id:
                        type: string
                        format: uuid
                        description: Identifier of the import record.
                      source:
                        type: string
                        example: pptx
                      status:
                        type: string
                        enum:
                          - succeeded
                        description: >-
                          Always `succeeded` in a 201 response. Failed imports
                          return an error status code instead.
                      warnings:
                        type: array
                        description: Non-fatal issues encountered during the import.
                        items:
                          type: object
                          required:
                            - code
                            - message
                          properties:
                            code:
                              type: string
                              example: missing_speaker_notes
                            message:
                              type: string
                            slideIndex:
                              type: integer
                              description: >-
                                Zero-based index of the affected slide, when the
                                warning applies to a single slide.
        '400':
          description: >-
            Bad request. The `code` field identifies the problem:
            `source_required` (missing `source` query parameter),
            `unsupported_source` (the response also includes a
            `supportedSources` array), `invalid_form_data`, `invalid_metadata`,
            or `invalid_pptx` (wrong extension, media type, or unreadable file).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '413':
          description: >-
            Request too large. The request body exceeds 30 MB
            (`request_too_large`) or the PowerPoint file exceeds 25 MB.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: >-
            The presentation could not be converted into a deck: it contains no
            slides (`empty_import`) or a slide failed to render
            (`invalid_rendered_slide`).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: >-
            Internal server error (`deck_import_failed`). No deck is created and
            uploaded files are cleaned up.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - sessionCookie: []
components:
  schemas:
    Deck:
      type: object
      properties:
        id:
          type: string
          format: uuid
        name:
          type: string
        description:
          type: string
          nullable: true
        type:
          type: string
          enum:
            - structured
            - image-based
        isActive:
          type: boolean
        metadata:
          type: object
          nullable: true
          properties:
            deckContext:
              type: string
              description: Background info used to guide AI narration generation
            voiceProvider:
              type: string
              enum:
                - elevenlabs
                - openai
        createdBy:
          type: string
          format: uuid
          nullable: true
          description: >-
            ID of the user who created the deck. Null for decks created before
            creator tracking was added.
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
      required:
        - id
        - name
        - type
        - isActive
        - createdAt
        - updatedAt
    Error:
      type: object
      properties:
        error:
          type: string
      required:
        - error
  securitySchemes:
    sessionCookie:
      type: apiKey
      in: cookie
      name: session
      description: Session cookie obtained from `POST /api/auth/login`.

````