> ## 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 Dynamic Thumbnails

> Generate product thumbnails from a video URL using AI-powered frame selection. Analyzes video, samples frames, preprocesses and then selects best frames, returns base64-encoded JPEGs.



## OpenAPI

````yaml POST /analysis/dynamic-thumbnails
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:
  /analysis/dynamic-thumbnails:
    post:
      tags:
        - Analysis
      summary: Generate Dynamic Thumbnails
      description: >-
        Generate product thumbnails from a video URL using AI-powered frame
        selection. Analyzes video, samples frames, preprocesses and then selects
        best frames, returns base64-encoded JPEGs.
      operationId: dynamicThumbnails
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/DynamicThumbnailRequest'
      responses:
        '200':
          description: Thumbnails generated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ThumbnailResponse'
        '400':
          description: Invalid video URL or unsupported format
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Model internal error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    DynamicThumbnailRequest:
      type: object
      properties:
        video_url:
          type: string
          description: S3 signed URL or public URL of the video
          example: https://your-s3-url.com/video.mp4
      required:
        - video_url
    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

````