> ## Documentation Index
> Fetch the complete documentation index at: https://demandiq-mintlify-76a18eee.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Start AI generation from images

> Accepts uploaded slide images, runs them through GPT-4o Vision to extract content, generates narration scripts, and synthesizes audio. Returns a job ID — poll `/api/decks/{deckId}/generate/status` for progress.



## OpenAPI

````yaml /sales-copilot/openapi.json post /api/decks/{deckId}/generate
openapi: 3.0.0
info:
  title: Sales CoPilot API
  version: 1.0.0
  description: >-
    REST API for Sales CoPilot — 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
paths:
  /api/decks/{deckId}/generate:
    post:
      tags:
        - Generation
      summary: Start AI generation from images
      description: >-
        Accepts uploaded slide images, runs them through GPT-4o Vision to
        extract content, generates narration scripts, and synthesizes audio.
        Returns a job ID — poll `/api/decks/{deckId}/generate/status` for
        progress.
      parameters:
        - in: path
          name: deckId
          required: true
          schema:
            type: string
            format: uuid
          description: UUID of the deck
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              required:
                - images
              properties:
                images:
                  type: array
                  items:
                    type: string
                    format: binary
                  description: Slide images (PNG, JPG, or WebP; max 10 MB each)
      responses:
        '202':
          description: Job accepted
          content:
            application/json:
              schema:
                type: object
                properties:
                  jobId:
                    type: string
                    format: uuid
        '400':
          description: Bad request
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - sessionCookie: []
components:
  schemas:
    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`.

````