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

# Generate Thumbnails (Upload)

> Generate product thumbnails from uploaded video file. Returns 3 thumbnails for videos ≤15s, 5 thumbnails for videos >15s.



## OpenAPI

````yaml POST /thumbnails/generate
openapi: 3.0.3
info:
  title: Narrative API
  description: AI-powered product video thumbnail generation API
  version: 0.1.0
servers:
  - url: http://localhost:8000
    description: Local development
security: []
paths:
  /thumbnails/generate:
    post:
      tags:
        - Thumbnails
      summary: Generate Thumbnails from Upload
      description: >-
        Generate product thumbnails from uploaded video file. Returns 3
        thumbnails for videos ≤15s, 5 thumbnails for videos >15s.
      operationId: generateThumbnails
      requestBody:
        required: true
        content:
          multipart/form-data:
            schema:
              type: object
              properties:
                video:
                  type: string
                  format: binary
                  description: Video file to process
              required:
                - video
      responses:
        '200':
          description: Thumbnails generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThumbnailResponse'
        '500':
          description: Failed to generate thumbnails
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    ThumbnailResponse:
      type: object
      properties:
        thumbnails:
          type: array
          items:
            type: string
          description: Base64-encoded JPEG images
          minItems: 1
          maxItems: 5
          example:
            - /9j/4AAQSkZJRgABAQAAAQABAAD...
            - /9j/4AAQSkZJRgABAQAAAQABAAD...
            - /9j/4AAQSkZJRgABAQAAAQABAAD...
        count:
          type: integer
          description: Number of thumbnails returned
          minimum: 1
          maximum: 5
          example: 3
      required:
        - thumbnails
        - count
    Error:
      type: object
      properties:
        detail:
          type: string
          description: Error message

````